[common] ActiveXObject for XMLHttpRequest failed in IE11 for some requests
This commit is contained in:
parent
8499e4d47b
commit
0fc75a9ab5
|
@ -39,6 +39,9 @@ Common.Locale = new(function() {
|
||||||
|
|
||||||
var _createXMLHTTPObject = function() {
|
var _createXMLHTTPObject = function() {
|
||||||
var xmlhttp;
|
var xmlhttp;
|
||||||
|
if (typeof XMLHttpRequest != 'undefined') {
|
||||||
|
xmlhttp = new XMLHttpRequest();
|
||||||
|
} else {
|
||||||
try {
|
try {
|
||||||
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
||||||
}
|
}
|
||||||
|
@ -50,9 +53,8 @@ Common.Locale = new(function() {
|
||||||
xmlhttp = false;
|
xmlhttp = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
|
|
||||||
xmlhttp = new XMLHttpRequest();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return xmlhttp;
|
return xmlhttp;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -634,6 +634,9 @@ Common.Utils.applyCustomizationPlugins = function(plugins) {
|
||||||
|
|
||||||
var _createXMLHTTPObject = function() {
|
var _createXMLHTTPObject = function() {
|
||||||
var xmlhttp;
|
var xmlhttp;
|
||||||
|
if (typeof XMLHttpRequest != 'undefined') {
|
||||||
|
xmlhttp = new XMLHttpRequest();
|
||||||
|
} else {
|
||||||
try {
|
try {
|
||||||
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
||||||
}
|
}
|
||||||
|
@ -645,9 +648,8 @@ Common.Utils.applyCustomizationPlugins = function(plugins) {
|
||||||
xmlhttp = false;
|
xmlhttp = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
|
|
||||||
xmlhttp = new XMLHttpRequest();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return xmlhttp;
|
return xmlhttp;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -690,6 +692,10 @@ Common.Utils.fillUserInfo = function(info, lang, defname) {
|
||||||
|
|
||||||
Common.Utils.createXhr = function () {
|
Common.Utils.createXhr = function () {
|
||||||
var xmlhttp;
|
var xmlhttp;
|
||||||
|
|
||||||
|
if (typeof XMLHttpRequest != 'undefined') {
|
||||||
|
xmlhttp = new XMLHttpRequest();
|
||||||
|
} else {
|
||||||
try {
|
try {
|
||||||
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -699,8 +705,6 @@ Common.Utils.createXhr = function () {
|
||||||
xmlhttp = false;
|
xmlhttp = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
|
|
||||||
xmlhttp = new XMLHttpRequest();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return xmlhttp;
|
return xmlhttp;
|
||||||
|
|
Loading…
Reference in a new issue