mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-01 02:42:03 +00:00
replace unload event listener with pagehide and add DOM safety checks
This commit is contained in:
1 parent
7e3d22b10e
commit
ce2803f354
1 file changed
+1
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user