aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/.jshintrc3
-rw-r--r--src/ajax/xhr.js8
2 files changed, 10 insertions, 1 deletions
diff --git a/src/.jshintrc b/src/.jshintrc
index ba16cd5db..a601fa051 100644
--- a/src/.jshintrc
+++ b/src/.jshintrc
@@ -20,6 +20,7 @@
"globals": {
"jQuery": true,
"define": true,
- "module": true
+ "module": true,
+ "ActiveXObject": true
}
}
diff --git a/src/ajax/xhr.js b/src/ajax/xhr.js
index 55d526a41..313dff5dc 100644
--- a/src/ajax/xhr.js
+++ b/src/ajax/xhr.js
@@ -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 ) {}