Ajax: remove event dependency from the ajax module

Ref 4e7f34f629
This commit is contained in:
Oleg Gaidarenko
2014-10-10 21:01:59 +04:00
parent 07afc284bc
commit c580a52971

View File

@@ -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 );
}