Skip to content
Browse files
Make sure that the unload event doesn't leak in IE - use jQuery's bin…
…ding mechanism to make that happen.
  • Loading branch information
jeresig committed Oct 10, 2010
1 parent bb0b9b8 commit 884de15fb970affd0b1697245795bce7b231a1db
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/event.js
@@ -1154,7 +1154,7 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
// More info:
// -
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

2 comments on commit 884de15


This comment has been minimized.

Copy link

@jitter jitter replied Oct 11, 2010

This breaks the testswarm environment for IE6/7 e.g.

The tests seem to run fine but at the very end of every test it says ERROR: Object doesn't support this action and every test-module is shown as failed

This could be related to


This comment has been minimized.

Copy link
Member Author

@jeresig jeresig replied Oct 11, 2010

Yeah - that was related, I just landed a variation of it. Thanks for the catch!

Please sign in to comment.