Mine
public text v1 · immutableobj = null;
if (window.XMLHttpRequest)
obj = new XMLHttpRequest();
else if (window.ActiveXObject) // if IE
{
var ieversions = ['Msxml2.XMLHTTP','Microsoft.XMLHTTP','Msxml2.XMLHTTP.5.0','Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.3.0'];
for(var i=0; !this.obj && i<ieversions.length; i++)
{
try
{
obj = new ActiveXObject(ieversions[i]);
break;
}
catch(e) { }
}
}