summaryrefslogtreecommitdiff
path: root/cli/tests/034_onload/imported.ts
blob: d71f9d65405690df07814dcb31a6d5940256845b (plain)
1
2
3
4
5
6
7
8
9
10
11
import { assert } from "../../../js/deps/https/deno.land/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");