summaryrefslogtreecommitdiff
path: root/tests/034_onload/main.ts
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2019-07-16 13:19:26 +0900
committerRyan Dahl <ry@tinyclouds.org>2019-07-16 00:19:26 -0400
commit9c454998646ef49f652bc919f53503ed07a1c55c (patch)
treea6275bdefa3da50cae08c6c0f753d816215d9602 /tests/034_onload/main.ts
parentbd6ebb32df11641e148fd0adca41e7188f16afce (diff)
Support window.onload (#2643)
Diffstat (limited to 'tests/034_onload/main.ts')
-rw-r--r--tests/034_onload/main.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/034_onload/main.ts b/tests/034_onload/main.ts
new file mode 100644
index 000000000..68851950a
--- /dev/null
+++ b/tests/034_onload/main.ts
@@ -0,0 +1,14 @@
+import "./imported.ts";
+
+window.addEventListener(
+ "load",
+ (e: Event): void => {
+ console.log(`got ${e.type} event in event handler (main)`);
+ }
+);
+
+window.onload = (e: Event): void => {
+ console.log(`got ${e.type} event in onload function`);
+};
+
+console.log("log from main");