diff options
Diffstat (limited to 'tests/testdata/run/onload/imported.ts')
-rw-r--r-- | tests/testdata/run/onload/imported.ts | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/testdata/run/onload/imported.ts b/tests/testdata/run/onload/imported.ts deleted file mode 100644 index 643e2fc78..000000000 --- a/tests/testdata/run/onload/imported.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { assert } from "@std/assert"; -import "./nest_imported.ts"; - -const handler = (e: Event) => { - assert(e.type === "beforeunload" ? e.cancelable : !e.cancelable); - console.log(`got ${e.type} event in event handler (imported)`); -}; - -globalThis.addEventListener("load", handler); -globalThis.addEventListener("beforeunload", handler); -globalThis.addEventListener("unload", handler); -console.log("log from imported script"); |