Skip to content

[Blazor] Invoke receiveHotReloadAsync directly #47964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ internal static async Task InitializeAsync()
// The agent is injected in to the hosted app and can serve this script that can provide results from local-storage.
// See https://github.com/dotnet/aspnetcore/issues/37357#issuecomment-941237000
await JSHost.ImportAsync(BlazorHotReloadModuleName, "/_framework/blazor-hotreload.js");
ReceiveHotReload();
await ReceiveHotReloadAsync();
}
}

Expand Down Expand Up @@ -74,6 +74,6 @@ public static string GetApplyUpdateCapabilities()
return (string)method.Invoke(obj: null, parameters: null)!;
}

[JSImport("receiveHotReload", BlazorHotReloadModuleName)]
private static partial void ReceiveHotReload();
[JSImport("receiveHotReloadAsync", BlazorHotReloadModuleName)]
private static partial Task ReceiveHotReloadAsync();
}