summaryrefslogtreecommitdiff
path: root/cli/tests/078_unload_on_exit.ts
blob: 43d33eb25340122d355a8485c40144716df67f4c (plain)
1
2
3
4
5
6
7
8
9
window.onunload = () => {
  console.log("onunload is called");
  // This second exit call doesn't trigger unload event,
  // and therefore actually stops the process.
  Deno.exit(1);
  console.log("This doesn't show up in console");
};
// This exit call triggers the above unload event handler.
Deno.exit(0);