diff options
author | jeresig <jeresig@gmail.com> | 2009-12-18 20:29:22 -0500 |
---|---|---|
committer | jeresig <jeresig@gmail.com> | 2009-12-18 20:29:22 -0500 |
commit | 42f8c3add3e0e4370d4bd6816bf471e07baf34be (patch) | |
tree | 6601a6aadea327f402ae3d81f353ac1e13784328 | |
parent | 0d06f3997be54896ab99e2ab0975dc7c144e7955 (diff) | |
download | jquery-42f8c3add3e0e4370d4bd6816bf471e07baf34be.tar.gz jquery-42f8c3add3e0e4370d4bd6816bf471e07baf34be.zip |
No need to use the conditional comment for binding the onunload event in IE.
-rw-r--r-- | src/event.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/event.js b/src/event.js index b50a1ec4e..a2b512ae1 100644 --- a/src/event.js +++ b/src/event.js @@ -882,15 +882,15 @@ 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/ -/*@cc_on -window.attachEvent("onunload", function() { - for ( var id in jQuery.cache ) { - if ( jQuery.cache[ id ].handle ) { - // Try/Catch is to handle iframes being unloaded, see #4280 - try { - jQuery.event.remove( jQuery.cache[ id ].handle.elem ); - } catch(e) {} +if ( window.attachEvent ) { + window.attachEvent("onunload", function() { + for ( var id in jQuery.cache ) { + if ( jQuery.cache[ id ].handle ) { + // Try/Catch is to handle iframes being unloaded, see #4280 + try { + jQuery.event.remove( jQuery.cache[ id ].handle.elem ); + } catch(e) {} + } } - } -}); -@*/ + }); +} |