mirror of
https://github.com/denoland/deno.git
synced 2025-02-08 15:21:26 -05:00
![Bartek Iwańczuk](/assets/img/avatar_default.png)
Fixes several tests blocking https://github.com/denoland/deno/pull/25213 by replacing `window` global that is gone in Deno 2 with `globalThis`. Also adjusted a few tests using deprecated `rid` field.
9 lines
313 B
TypeScript
9 lines
313 B
TypeScript
globalThis.onunload = () => {
|
|
console.log("onunload is called");
|
|
// This second exit call doesn't trigger unload event,
|
|
// and therefore actually stops the process.
|
|
Deno.exit(1);
|
|
console.log("This doesn't show up in console");
|
|
};
|
|
// This exit call triggers the above unload event handler.
|
|
Deno.exit(0);
|