]> source.dussan.org Git - jquery.git/commitdiff
Ajax: remove event dependency from the ajax module 1697/head
authorOleg Gaidarenko <markelog@gmail.com>
Fri, 10 Oct 2014 17:01:59 +0000 (21:01 +0400)
committerOleg Gaidarenko <markelog@gmail.com>
Tue, 14 Oct 2014 17:24:05 +0000 (21:24 +0400)
Closes gh-1695

src/ajax/xhr.js

index a733eded02808bc15fc774c776f0bb51a2d32690..32afd2309ba0c5a1c35e23aaad24b3c229eaa578 100644 (file)
@@ -23,8 +23,9 @@ var xhrId = 0,
 
 // Support: IE9
 // 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 ]();
                }