Skip to content
Permalink
Browse files

Add a try/catch to handle the exception thrown by unloaded iframes in…

… IE. Fixes #4280.
  • Loading branch information
jeresig committed Dec 10, 2009
1 parent 9d8bd16 commit b846ad4ca060a100dec3ace5711f96a083bc4ac3
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/event.js
@@ -896,7 +896,10 @@ jQuery( window ).bind( 'unload', function() {
for ( var id in jQuery.cache ) {
// Skip the window
if ( id != 1 && jQuery.cache[ id ].handle ) {
jQuery.event.remove( jQuery.cache[ id ].handle.elem );
// 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 b846ad4

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