Ajax: remove event dependency from the ajax module

Closes gh-1695
This commit is contained in:
Oleg Gaidarenko 2014-10-10 21:01:59 +04:00
parent edfc94df92
commit 4e7f34f629

View File

@ -23,8 +23,9 @@ var xhrId = 0,
// Support: IE9 // Support: IE9
// Open requests must be manually aborted on unload (#5280) // Open requests must be manually aborted on unload (#5280)
if ( window.ActiveXObject ) { // See https://support.microsoft.com/kb/2856746 for more info
jQuery( window ).on( "unload", function() { if ( window.attachEvent ) {
window.attachEvent( "onunload", function() {
for ( var key in xhrCallbacks ) { for ( var key in xhrCallbacks ) {
xhrCallbacks[ key ](); xhrCallbacks[ key ]();
} }