JSFiddle - React, Tailwind, and code Playground
by Chase Wilson
HTML
<div id="catch"></div>
JavaScript
var XHR = (function(){
var ins = [
function(){return new ActiveXObject('Microsoft.XMLHTTP')}
,function(){return new ActiveXObject('Msxml2.XMLHTTP')}
,function(){return new XMLHttpRequest()}
]
return (function tryX(){
while(ins.length){
try{ ins.pop()() } catch(){ tryX() }
finally{ return ins[ins.length - 1] }
}
}())
}())
var xhrInstance = XHR();
$('catch').set('text',xhrInstance);