Fix Stop + broken buttons: use location.reload() which preserves hash but fully unloads page, killing workers and audio. Revert pathname routing (unnecessary).
This commit is contained in:
1 parent
f6a1dccdf2
commit
7f17f4b31e
2 files changed
+8
-33
No files matched your search
@@ -65,9 +65,10 @@
|
||||
}
|
||||
|
||||
function stopEmulator() {
|
||||
// Navigate to an actual server path to force full page unload
|
||||
// which kills Web Workers, AudioContexts, and WASM threads
|
||||
window.location.href = `/game/${game.id}`;
|
||||
// Force full page reload which terminates all workers, AudioContexts
|
||||
// and WASM threads. Hash is preserved so the SPA routes correctly.
|
||||
window.location.hash = `#/game/${game.id}`;
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
$effect(() => { load(); });
|
||||
|
||||
Reference in new issue
Block a user