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