Commit 42f8c3ad authored by jeresig's avatar jeresig

No need to use the conditional comment for binding the onunload event in IE.

parent 0d06f399
...@@ -882,15 +882,15 @@ jQuery.each( ("blur focus load resize scroll unload click dblclick " + ...@@ -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 // Window isn't included so as not to unbind existing unload events
// More info: // More info:
// - http://isaacschlueter.com/2006/10/msie-memory-leaks/ // - http://isaacschlueter.com/2006/10/msie-memory-leaks/
/*@cc_on if ( window.attachEvent ) {
window.attachEvent("onunload", function() { window.attachEvent("onunload", function() {
for ( var id in jQuery.cache ) { for ( var id in jQuery.cache ) {
if ( jQuery.cache[ id ].handle ) { if ( jQuery.cache[ id ].handle ) {
// Try/Catch is to handle iframes being unloaded, see #4280 // Try/Catch is to handle iframes being unloaded, see #4280
try { try {
jQuery.event.remove( jQuery.cache[ id ].handle.elem ); jQuery.event.remove( jQuery.cache[ id ].handle.elem );
} catch(e) {} } catch(e) {}
}
} }
} });
}); }
@*/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment