mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Fix #14475. Use IE11-friendly detect for proper XHR object.
We don't seem to have test cases for local file access.
This commit is contained in:
parent
473c7db79e
commit
9ca87af44c
@ -6,13 +6,9 @@ define([
|
|||||||
|
|
||||||
// Create the request object
|
// Create the request object
|
||||||
// (This is still attached to ajaxSettings for backward compatibility)
|
// (This is still attached to ajaxSettings for backward compatibility)
|
||||||
jQuery.ajaxSettings.xhr = window.ActiveXObject ?
|
jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ?
|
||||||
/* Microsoft failed to properly
|
// Support: IE6+
|
||||||
* implement the XMLHttpRequest in IE7 (can't request local files),
|
// XHR cannot access local files, always use ActiveX for that case
|
||||||
* so we use the ActiveXObject when it is available
|
|
||||||
* Additionally XMLHttpRequest can be disabled in IE7/IE8 so
|
|
||||||
* we need a fallback.
|
|
||||||
*/
|
|
||||||
function() {
|
function() {
|
||||||
return !this.isLocal && createStandardXHR() || createActiveXHR();
|
return !this.isLocal && createStandardXHR() || createActiveXHR();
|
||||||
} :
|
} :
|
||||||
|
Loading…
Reference in New Issue
Block a user