mirror of
https://github.com/jquery/jquery.git
synced 2024-10-05 11:34:18 +00:00
Add a try/catch to handle the exception thrown by unloaded iframes in IE. Fixes #4280.
This commit is contained in:
parent
9d8bd161b6
commit
b846ad4ca0
@ -896,7 +896,10 @@ jQuery( window ).bind( 'unload', function() {
|
|||||||
for ( var id in jQuery.cache ) {
|
for ( var id in jQuery.cache ) {
|
||||||
// Skip the window
|
// Skip the window
|
||||||
if ( id != 1 && jQuery.cache[ id ].handle ) {
|
if ( id != 1 && jQuery.cache[ id ].handle ) {
|
||||||
|
// Try/Catch is to handle iframes being unloaded, see #4280
|
||||||
|
try {
|
||||||
jQuery.event.remove( jQuery.cache[ id ].handle.elem );
|
jQuery.event.remove( jQuery.cache[ id ].handle.elem );
|
||||||
|
} catch(e) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user