replace unload event listener with pagehide and add DOM safety checks

This commit is contained in:
daboe01
2026-08-12 16:58:12 +02:00
parent 7e3d22b10e
commit ce2803f354
+1 -1
View File
@@ -481,7 +481,7 @@ _CPPlatformWindowWillCloseNotification = @"_CPPlatformWindowWillCloseNotificatio
_DOMWindow.addEventListener("blur", onBlurEventCallback, NO);
_DOMWindow.addEventListener("focus", onFocusEventCallback, NO);
_DOMWindow.addEventListener("unload", function()
_DOMWindow.addEventListener("pagehide", function()
{
_DOMWindow.removeEventListener("unload", arguments.callee, NO);