Skip to content

Instantly share code, notes, and snippets.

@augustl
Created August 9, 2010 13:03
Show Gist options
  • Save augustl/515380 to your computer and use it in GitHub Desktop.
Save augustl/515380 to your computer and use it in GitHub Desktop.
tacet = {
create: (function () {
function F() {}
return function (proto) {
F.prototype = proto;
return new F();
};
}),
XMLHttpRequest: (function () {
var options = [
function () { return new XMLHttpRequest() },
function () { return new ActiveXObject("Microsoft.XMLHTTP") },
function () { return new ActiveXObject("Msxml2.XMLHTTP.6.0") }
];
for (var i = 0, il = options.length; i < il; i++) {
try { return options[i]() } catch(e) {}
}
})
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment