0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
denoland-deno/cli/tests/034_onload/imported.ts

12 lines
348 B
TypeScript
Raw Normal View History

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