deno/cli/tests/034_onload/imported.ts

12 lines
372 B
TypeScript
Raw Normal View History

2019-10-02 15:32:51 +00:00
import { assert } from "../../../js/deps/https/deno.land/std/testing/asserts.ts";
2019-07-16 04:19:26 +00:00
import "./nest_imported.ts";
2019-10-02 15:32:51 +00:00
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);
2019-07-16 04:19:26 +00:00
console.log("log from imported script");