diff --git a/src/Components/Web.JS/src/Boot.Server.ts b/src/Components/Web.JS/src/Boot.Server.ts index 824c12546963..786b92694563 100644 --- a/src/Components/Web.JS/src/Boot.Server.ts +++ b/src/Components/Web.JS/src/Boot.Server.ts @@ -18,7 +18,8 @@ function boot(userOptions?: Partial): Promise { } started = true; - const configuredOptions = resolveOptions(userOptions); + const normalizedOptions = userOptions?.circuit ?? userOptions; + const configuredOptions = resolveOptions(normalizedOptions); setCircuitOptions(Promise.resolve(configuredOptions || {})); JSEventRegistry.create(Blazor); diff --git a/src/Components/Web.JS/src/Boot.WebAssembly.ts b/src/Components/Web.JS/src/Boot.WebAssembly.ts index ca1523f60f1c..3b54502272af 100644 --- a/src/Components/Web.JS/src/Boot.WebAssembly.ts +++ b/src/Components/Web.JS/src/Boot.WebAssembly.ts @@ -20,7 +20,8 @@ async function boot(options?: Partial): Promise { } started = true; - setWebAssemblyOptions(Promise.resolve(options || {})); + const normalizedOptions = options?.webAssembly ?? options; + setWebAssemblyOptions(Promise.resolve(normalizedOptions || {})); JSEventRegistry.create(Blazor); const webAssemblyComponents = discoverComponents(document, 'webassembly') as WebAssemblyComponentDescriptor[]; diff --git a/src/Components/Web.JS/src/Platform/Circuits/CircuitStartOptions.ts b/src/Components/Web.JS/src/Platform/Circuits/CircuitStartOptions.ts index ac94b7a2d781..a431d5d3a050 100644 --- a/src/Components/Web.JS/src/Platform/Circuits/CircuitStartOptions.ts +++ b/src/Components/Web.JS/src/Platform/Circuits/CircuitStartOptions.ts @@ -20,6 +20,8 @@ export interface CircuitStartOptions { reconnectionHandler?: ReconnectionHandler; initializers : ServerInitializers; circuitHandlers: CircuitHandler[]; + // Exists for compatibility with WebStartOptions. + circuit?: CircuitStartOptions; } export function resolveOptions(userOptions?: Partial): CircuitStartOptions { diff --git a/src/Components/Web.JS/src/Platform/WebAssemblyStartOptions.ts b/src/Components/Web.JS/src/Platform/WebAssemblyStartOptions.ts index 6eec9e2b9a1e..fdec303cfa19 100644 --- a/src/Components/Web.JS/src/Platform/WebAssemblyStartOptions.ts +++ b/src/Components/Web.JS/src/Platform/WebAssemblyStartOptions.ts @@ -34,6 +34,11 @@ export interface WebAssemblyStartOptions { * Allows to override .NET runtime configuration. */ configureRuntime(builder: DotnetHostBuilder): void; + + /** + * Exists for compatibility with WebStartOptions. + */ + webAssembly?: WebAssemblyStartOptions; } // This type doesn't have to align with anything in BootConfig.