aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Gaidarenko <markelog@gmail.com>2014-10-10 21:01:59 +0400
committerMichał Gołębiowski <m.goleb@gmail.com>2014-12-11 23:55:22 +0100
commitac1581b265726629437b7f02da486451a99159b5 (patch)
tree19d1573ff19572d1e582089b09b550f9e52d7dfb
parent9448be717ce7ccc21dccf7e3d8d929252f270a89 (diff)
downloadjquery-ac1581b265726629437b7f02da486451a99159b5.tar.gz
jquery-ac1581b265726629437b7f02da486451a99159b5.zip
Ajax: remove event dependency from the ajax module
(cherry-picked from 4e7f34f6296111f7f91d621397dfb02c6bf4c41f) Closes gh-1695
-rw-r--r--src/ajax/xhr.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js
index bdeeee3f8..c2b43c921 100644
--- a/src/ajax/xhr.js
+++ b/src/ajax/xhr.js
@@ -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 ]();
}