summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/run/onload/nest_imported.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/run/onload/nest_imported.ts')
-rw-r--r--cli/tests/testdata/run/onload/nest_imported.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/tests/testdata/run/onload/nest_imported.ts b/cli/tests/testdata/run/onload/nest_imported.ts
new file mode 100644
index 000000000..351a3cb22
--- /dev/null
+++ b/cli/tests/testdata/run/onload/nest_imported.ts
@@ -0,0 +1,11 @@
+// deno-lint-ignore-file no-window-prefix
+import { assert } from "../../../../../test_util/std/testing/asserts.ts";
+
+const handler = (e: Event) => {
+ assert(!e.cancelable);
+ console.log(`got ${e.type} event in event handler (nest_imported)`);
+};
+
+window.addEventListener("load", handler);
+window.addEventListener("unload", handler);
+console.log("log from nest_imported script");