Skip to content

Commit a400348

Browse files
authored
Replace unload event with pagehide for sending disconnect beacon from the Blazor client (#62805)
1 parent 02125bd commit a400348

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ async function startServerCore(components: RootComponentManager<ServerComponentD
121121

122122
Blazor.disconnect = cleanup;
123123

124-
window.addEventListener('unload', cleanup, { capture: false, once: true });
124+
window.addEventListener('pagehide', cleanup, { capture: false, once: true });
125125

126126
logger.log(LogLevel.Information, 'Blazor server-side application started.');
127127

0 commit comments

Comments
 (0)