diff options
author | Colin Ihrig <cjihrig@gmail.com> | 2022-06-28 10:49:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-28 10:49:30 -0400 |
commit | 0f6a5c5fc24e8dc9125c5c536c8547a86ca87b15 (patch) | |
tree | 41538ee1df06dc80d60e49ed50177f99ba8dc297 /cli/lsp/testing/execution.rs | |
parent | ab11b45d1d2678cfea2217ac72fc24317eef777d (diff) |
feat(web): add beforeunload event (#14830)
This commit adds the 'beforeunload' event.
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/lsp/testing/execution.rs')
-rw-r--r-- | cli/lsp/testing/execution.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/lsp/testing/execution.rs b/cli/lsp/testing/execution.rs index 6b4e947a0..83f74e5ed 100644 --- a/cli/lsp/testing/execution.rs +++ b/cli/lsp/testing/execution.rs @@ -226,6 +226,12 @@ async fn test_specifier( worker.js_runtime.resolve_value(test_result).await?; + loop { + if !worker.dispatch_beforeunload_event(&located_script_name!())? { + break; + } + worker.run_event_loop(false).await?; + } worker.dispatch_unload_event(&located_script_name!())?; } |