Merge branch 'fix7762' into jquery master. Fixes #7762.
This commit is contained in:
commit
429b078dc7
1 changed files with 26 additions and 43 deletions
17
src/event.js
17
src/event.js
|
@ -1183,21 +1183,4 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Prevent memory leaks in IE
|
|
||||||
// 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 && !window.addEventListener ) {
|
|
||||||
jQuery(window).bind("unload", 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) {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
})( jQuery );
|
})( jQuery );
|
||||||
|
|
Loading…
Add table
Reference in a new issue