mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
No need to use jQuery's event system for binding the onunload event in IE.
This commit is contained in:
parent
649024909d
commit
fe9333cc79
@ -876,10 +876,9 @@ jQuery.each( ("blur focus load resize scroll unload click dblclick " +
|
|||||||
// More info:
|
// More info:
|
||||||
// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
|
// - http://isaacschlueter.com/2006/10/msie-memory-leaks/
|
||||||
/*@cc_on
|
/*@cc_on
|
||||||
jQuery( window ).bind( 'unload', function() {
|
window.attachEvent("onunload", function() {
|
||||||
for ( var id in jQuery.cache ) {
|
for ( var id in jQuery.cache ) {
|
||||||
// Skip the window
|
if ( jQuery.cache[ id ].handle ) {
|
||||||
if ( id != 1 && jQuery.cache[ id ].handle ) {
|
|
||||||
// Try/Catch is to handle iframes being unloaded, see #4280
|
// Try/Catch is to handle iframes being unloaded, see #4280
|
||||||
try {
|
try {
|
||||||
jQuery.event.remove( jQuery.cache[ id ].handle.elem );
|
jQuery.event.remove( jQuery.cache[ id ].handle.elem );
|
||||||
|
Loading…
Reference in New Issue
Block a user