Skip to content
Permalink
Browse files

No need to use the conditional comment for binding the onunload event…

… in IE.
  • Loading branch information
jeresig committed Dec 19, 2009
1 parent 0d06f39 commit 42f8c3add3e0e4370d4bd6816bf471e07baf34be
Showing with 11 additions and 11 deletions.
  1. +11 −11 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) {}
}
}
}
});
@*/
});
}

0 comments on commit 42f8c3a

Please sign in to comment.
You can’t perform that action at this time.