diff options
author | jeresig <jeresig@gmail.com> | 2010-10-10 18:01:59 -0400 |
---|---|---|
committer | jeresig <jeresig@gmail.com> | 2010-10-10 18:01:59 -0400 |
commit | 884de15fb970affd0b1697245795bce7b231a1db (patch) | |
tree | f8333711166991607c077fd413ef339596b59ecc | |
parent | bb0b9b8958c22269767a151d86340d6eaf659bab (diff) | |
download | jquery-884de15fb970affd0b1697245795bce7b231a1db.tar.gz jquery-884de15fb970affd0b1697245795bce7b231a1db.zip |
Make sure that the unload event doesn't leak in IE - use jQuery's binding mechanism to make that happen.
-rw-r--r-- | src/event.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/event.js b/src/event.js index 82e309d98..7a10a12cb 100644 --- a/src/event.js +++ b/src/event.js @@ -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 |