Skip to content

Commit 2b174b7

Browse files
committed
Webassembly working (I believe)
1 parent b249495 commit 2b174b7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Components/Web.JS/src/Boot.WebAssembly.Common.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ async function startCore(components: RootComponentManager<WebAssemblyComponentDe
156156

157157
Blazor._internal.getInitialComponentsUpdate = () => initialUpdatePromise;
158158

159-
Blazor._internal.updateRootComponents = (operations: string) =>
160-
Blazor._internal.dotNetExports?.UpdateRootComponentsCore(operations);
159+
Blazor._internal.updateRootComponents = (operations: string) => {
160+
const appState = discoverWebAssemblyPersistedState(document) || '';
161+
Blazor._internal.dotNetExports?.UpdateRootComponentsCore(operations, appState);
162+
};
161163

162164
Blazor._internal.endUpdateRootComponents = (batchId: number) =>
163165
components.onAfterUpdateRootComponents?.(batchId);

src/Components/Web.JS/src/GlobalExports.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export interface IBlazor {
8787
EndInvokeJS: (argsJson: string) => void;
8888
BeginInvokeDotNet: (callId: string | null, assemblyNameOrDotNetObjectId: string, methodIdentifier: string, argsJson: string) => void;
8989
ReceiveByteArrayFromJS: (id: number, data: Uint8Array) => void;
90-
UpdateRootComponentsCore: (operationsJson: string) => void;
90+
UpdateRootComponentsCore: (operationsJson: string, appState: string) => void;
9191
}
9292

9393
// APIs invoked by hot reload

0 commit comments

Comments
 (0)