mirror of
https://github.com/jquery/jquery.git
synced 2026-01-25 03:57:57 -05:00
Make sure that the unload event doesn't leak in IE - use jQuery's binding mechanism to make that happen.
This commit is contained in:
@@ -1154,7 +1154,7 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
|
||||
// More info:
|
||||
// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
|
||||
if ( window.attachEvent && !window.addEventListener ) {
|
||||
window.attachEvent("onunload", function() {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user