From: jeresig Date: Sat, 19 Dec 2009 03:35:02 +0000 (-0500) Subject: Make sure that we don't bind the onunload event in Opera. X-Git-Url: http://git.asbjorn.biz/?a=commitdiff_plain;h=1feb92afb42d5213e2705290761779260bbd1fa4;p=jquery.git Make sure that we don't bind the onunload event in Opera. --- diff --git a/src/event.js b/src/event.js index a2b512a..cf00e18 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 ) {