From 0f6a5c5fc24e8dc9125c5c536c8547a86ca87b15 Mon Sep 17 00:00:00 2001 From: Colin Ihrig Date: Tue, 28 Jun 2022 10:49:30 -0400 Subject: feat(web): add beforeunload event (#14830) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds the 'beforeunload' event. Co-authored-by: Bartek IwaƄczuk --- runtime/js/99_main.js | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/js/99_main.js') diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 1d046d161..c13faa936 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -583,6 +583,7 @@ delete Intl.v8BreakIterator; defineEventHandler(window, "error"); defineEventHandler(window, "load"); + defineEventHandler(window, "beforeunload"); defineEventHandler(window, "unload"); const isUnloadDispatched = SymbolFor("isUnloadDispatched"); // Stores the flag for checking whether unload is dispatched or not. -- cgit v1.2.3