summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/run/onload/nest_imported.ts
blob: 351a3cb2218491b28a5b5e0451978204c4ad81b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
// deno-lint-ignore-file no-window-prefix
import { assert } from "../../../../../test_util/std/testing/asserts.ts";

const handler = (e: Event) => {
  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");