diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2014-10-10 21:01:59 +0400 |
---|---|---|
committer | Michał Gołębiowski <m.goleb@gmail.com> | 2014-12-11 23:58:09 +0100 |
commit | 1026d17d4c504e89b114d216500f513e43e41fdd (patch) | |
tree | 21eaacbacb8d0f2030a3c54ae8921fda4f1ef442 /src | |
parent | 76294e1e9e25665b22467c099ed406402f784e2a (diff) | |
download | jquery-1026d17d4c504e89b114d216500f513e43e41fdd.tar.gz jquery-1026d17d4c504e89b114d216500f513e43e41fdd.zip |
Ajax: remove event dependency from the ajax module
(cherry-picked from c580a529716cd89eccdbda1bf3e9636e5a38811e)
Ref 4e7f34f6296111f7f91d621397dfb02c6bf4c41f
Diffstat (limited to 'src')
-rw-r--r-- | src/ajax/xhr.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js index 0f560f45a..f458cebcc 100644 --- a/src/ajax/xhr.js +++ b/src/ajax/xhr.js @@ -32,8 +32,9 @@ var xhrId = 0, // Support: IE<10 // Open requests must be manually aborted on unload (#5280) -if ( window.ActiveXObject ) { - jQuery( window ).on( "unload", function() { +// See https://support.microsoft.com/kb/2856746 for more info +if ( window.attachEvent ) { + window.attachEvent( "onunload", function() { for ( var key in xhrCallbacks ) { xhrCallbacks[ key ]( undefined, true ); } |