Skip to content

Instantly share code, notes, and snippets.

@cjohansen
Forked from augustl/tacet.js
Created August 9, 2010 13:04
Show Gist options
  • Save cjohansen/515382 to your computer and use it in GitHub Desktop.
Save cjohansen/515382 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") }
];
for (var i = 0, il = options.length; i < il; i++) {
try {
if (options[i]()) {
return options[i];
}
} catch(e) {}
}
})
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment