From 1feb92afb42d5213e2705290761779260bbd1fa4 Mon Sep 17 00:00:00 2001 From: jeresig Date: Fri, 18 Dec 2009 22:35:02 -0500 Subject: [PATCH] Make sure that we don't bind the onunload event in Opera. --- src/event.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/event.js b/src/event.js index a2b512ae1b..cf00e18630 100644 --- a/src/event.js +++ b/src/event.js @@ -882,7 +882,7 @@ jQuery.each( ("blur focus load resize scroll unload click dblclick " + // Window isn't included so as not to unbind existing unload events // More info: // - http://isaacschlueter.com/2006/10/msie-memory-leaks/ -if ( window.attachEvent ) { +if ( window.attachEvent && !window.addEventListener ) { window.attachEvent("onunload", function() { for ( var id in jQuery.cache ) { if ( jQuery.cache[ id ].handle ) {