2021-12-09 17:12:21 -05:00
|
|
|
// deno-lint-ignore-file no-window-prefix
|
2024-02-13 11:22:49 -05:00
|
|
|
import { assert } from "../../../../tests/util/std/assert/mod.ts";
|
2019-10-02 11:32:51 -04:00
|
|
|
|
2021-08-05 07:08:58 -04:00
|
|
|
const handler = (e: Event) => {
|
2022-10-13 04:47:47 -04:00
|
|
|
assert(e.type === "beforeunload" ? e.cancelable : !e.cancelable);
|
2019-10-02 11:32:51 -04:00
|
|
|
console.log(`got ${e.type} event in event handler (nest_imported)`);
|
|
|
|
};
|
|
|
|
|
|
|
|
window.addEventListener("load", handler);
|
2022-10-13 04:47:47 -04:00
|
|
|
window.addEventListener("beforeunload", handler);
|
2019-10-02 11:32:51 -04:00
|
|
|
window.addEventListener("unload", handler);
|
2019-07-16 00:19:26 -04:00
|
|
|
console.log("log from nest_imported script");
|