]> source.dussan.org Git - jquery.git/commitdiff
Make sure that we don't bind the onunload event in Opera.
authorjeresig <jeresig@gmail.com>
Sat, 19 Dec 2009 03:35:02 +0000 (22:35 -0500)
committerjeresig <jeresig@gmail.com>
Sat, 19 Dec 2009 03:35:02 +0000 (22:35 -0500)
src/event.js

index a2b512ae1b5f5071ba6c90cadd7b2390558d5e49..cf00e18630e5e651d99cef95ae18000b0316ade0 100644 (file)
@@ -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 ) {