diff --git a/ext/web/02_event.js b/ext/web/02_event.js index dd8b4f57b9..f354bf1828 100644 --- a/ext/web/02_event.js +++ b/ext/web/02_event.js @@ -1062,7 +1062,7 @@ class EventTarget { // This prevents the recursive dispatches of unload events. // See https://github.com/denoland/deno/issues/9201. if (event.type === "unload" && self === globalThis_) { - globalThis_[SymbolFor("isUnloadDispatched")] = true; + globalThis_[SymbolFor("Deno.isUnloadDispatched")] = true; } const { listeners } = self[eventTargetData]; diff --git a/runtime/js/30_os.js b/runtime/js/30_os.js index 76325cfffe..3af5803ad6 100644 --- a/runtime/js/30_os.js +++ b/runtime/js/30_os.js @@ -61,7 +61,7 @@ function exit(code) { } // Dispatches `unload` only when it's not dispatched yet. - if (!globalThis[SymbolFor("isUnloadDispatched")]) { + if (!globalThis[SymbolFor("Deno.isUnloadDispatched")]) { // Invokes the `unload` hooks before exiting // ref: https://github.com/denoland/deno/issues/3603 windowDispatchEvent(new Event("unload"));