Created
August 31, 2009 16:55
-
-
Save appden/178569 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// adds in support for having just msxml.dll, see issue #739 on -core | |
Browser.Request = function(){ | |
return $try(function(){ | |
return new XMLHttpRequest(); | |
}, function(){ | |
return new ActiveXObject('MSXML2.XMLHTTP'); | |
}, function(){ | |
return new ActiveXObject('Microsoft.XMLHTTP'); | |
}); | |
}; | |
// for 2.0... | |
Browser.Request = (function(){ | |
var XMLHTTP = function(){ | |
return new XMLHttpRequest(); | |
}; | |
var MSXML2 = function(){ | |
return new ActiveXObject('MSXML2.XMLHTTP'); | |
}; | |
var MSXML = function(){ | |
return new ActiveXObject('Microsoft.XMLHTTP'); | |
}; | |
return Function.stab(function(){ | |
XMLHTTP(); | |
return XMLHTTP; | |
}, function(){ | |
MSXML2(); | |
return MSXML2; | |
}, function(){ | |
MSXML(); | |
return MSXML; | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment