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 a2b512a..cf00e18 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 ) {