Skip to content

Commit 4e7f34f

Browse files
committed
Ajax: remove event dependency from the ajax module
Closes jquerygh-1695
1 parent edfc94d commit 4e7f34f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ajax/xhr.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ var xhrId = 0,
2323

2424
// Support: IE9
2525
// Open requests must be manually aborted on unload (#5280)
26-
if ( window.ActiveXObject ) {
27-
jQuery( window ).on( "unload", function() {
26+
// See https://support.microsoft.com/kb/2856746 for more info
27+
if ( window.attachEvent ) {
28+
window.attachEvent( "onunload", function() {
2829
for ( var key in xhrCallbacks ) {
2930
xhrCallbacks[ key ]();
3031
}

0 commit comments

Comments
 (0)