diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2021-01-12 19:32:58 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-12 05:32:58 -0500 |
commit | fd56fa89f36016a816450cd0e8df5853c66d170c (patch) | |
tree | 7d21163bf2a1c5a4d5f73f998afbaa2e4c2b7a91 /runtime/js/30_os.js | |
parent | 5c6ab75de1e5817df3620a5cdd85eba748b2a8a6 (diff) |
fix(cli): dispatch unload on exit (#9088)
Diffstat (limited to 'runtime/js/30_os.js')
-rw-r--r-- | runtime/js/30_os.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/js/30_os.js b/runtime/js/30_os.js index 74af82124..1d700b561 100644 --- a/runtime/js/30_os.js +++ b/runtime/js/30_os.js @@ -24,6 +24,9 @@ } function exit(code = 0) { + // Invokes the `unload` hooks before exiting + // ref: https://github.com/denoland/deno/issues/3603 + window.dispatchEvent(new Event("unload")); core.jsonOpSync("op_exit", { code }); throw new Error("Code not reachable"); } |