diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2021-01-21 16:44:48 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-21 16:44:48 +0900 |
commit | 18ac7d40c87b380ce5ed617bd7c59e344730a883 (patch) | |
tree | 2588d833bed775c22756db9e18742ec736e498da /cli/tests/078_unload_on_exit.ts | |
parent | 8bef29fd74f24e3682069a1188386d90805a9904 (diff) |
fix(runtime): fix recursive dispatches of unload event (#9207)
Diffstat (limited to 'cli/tests/078_unload_on_exit.ts')
-rw-r--r-- | cli/tests/078_unload_on_exit.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/tests/078_unload_on_exit.ts b/cli/tests/078_unload_on_exit.ts index e8288ef31..43d33eb25 100644 --- a/cli/tests/078_unload_on_exit.ts +++ b/cli/tests/078_unload_on_exit.ts @@ -1,4 +1,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); |