Commit 498e0e6c authored by Dave Methvin's avatar Dave Methvin

Ajax: Fix #14424. Use ActiveX in IE9+ on local files, close gh-1434.

We can't feature detect ActiveX in IE11, but we can just call
it and catch whatever error occurs, then try normal XHR.
parent d0782ed7
......@@ -20,6 +20,7 @@
"globals": {
"jQuery": true,
"define": true,
"module": true
"module": true,
"ActiveXObject": true
}
}
......@@ -5,6 +5,14 @@ define([
], function( jQuery, support ) {
jQuery.ajaxSettings.xhr = function() {
// Support: IE9+
// IE can't get local files with standard XHR, only ActiveX
if ( this.isLocal ) {
try {
return new ActiveXObject( "Microsoft.XMLHTTP" );
} catch( e ) {}
}
try {
return new XMLHttpRequest();
} catch( e ) {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment