mirror of
https://github.com/denoland/deno.git
synced 2024-12-25 00:29:09 -05:00
fix(rumtime): Add Deno.
prefix for registered symbols (#18086)
This commit is contained in:
parent
4e8edafb39
commit
521cb4ca9b
2 changed files with 2 additions and 2 deletions
|
@ -1062,7 +1062,7 @@ class EventTarget {
|
||||||
// This prevents the recursive dispatches of unload events.
|
// This prevents the recursive dispatches of unload events.
|
||||||
// See https://github.com/denoland/deno/issues/9201.
|
// See https://github.com/denoland/deno/issues/9201.
|
||||||
if (event.type === "unload" && self === globalThis_) {
|
if (event.type === "unload" && self === globalThis_) {
|
||||||
globalThis_[SymbolFor("isUnloadDispatched")] = true;
|
globalThis_[SymbolFor("Deno.isUnloadDispatched")] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { listeners } = self[eventTargetData];
|
const { listeners } = self[eventTargetData];
|
||||||
|
|
|
@ -61,7 +61,7 @@ function exit(code) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dispatches `unload` only when it's not dispatched yet.
|
// Dispatches `unload` only when it's not dispatched yet.
|
||||||
if (!globalThis[SymbolFor("isUnloadDispatched")]) {
|
if (!globalThis[SymbolFor("Deno.isUnloadDispatched")]) {
|
||||||
// Invokes the `unload` hooks before exiting
|
// Invokes the `unload` hooks before exiting
|
||||||
// ref: https://github.com/denoland/deno/issues/3603
|
// ref: https://github.com/denoland/deno/issues/3603
|
||||||
windowDispatchEvent(new Event("unload"));
|
windowDispatchEvent(new Event("unload"));
|
||||||
|
|
Loading…
Reference in a new issue