diff options
Diffstat (limited to 'cli/tests/034_onload/nest_imported.ts')
-rw-r--r-- | cli/tests/034_onload/nest_imported.ts | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cli/tests/034_onload/nest_imported.ts b/cli/tests/034_onload/nest_imported.ts index 2e2bee1d5..3c4b1d96a 100644 --- a/cli/tests/034_onload/nest_imported.ts +++ b/cli/tests/034_onload/nest_imported.ts @@ -1,7 +1,10 @@ -window.addEventListener( - "load", - (e: Event): void => { - console.log(`got ${e.type} event in event handler (nest_imported)`); - } -); +import { assert } from "../../../js/deps/https/deno.land/std/testing/asserts.ts"; + +const handler = (e: Event): void => { + 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"); |