summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/034_onload/nest_imported.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/testdata/034_onload/nest_imported.ts')
-rw-r--r--cli/tests/testdata/034_onload/nest_imported.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/tests/testdata/034_onload/nest_imported.ts b/cli/tests/testdata/034_onload/nest_imported.ts
new file mode 100644
index 000000000..259e505a2
--- /dev/null
+++ b/cli/tests/testdata/034_onload/nest_imported.ts
@@ -0,0 +1,10 @@
+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");