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