Skip to content

Instantly share code, notes, and snippets.

@kcdipesh
Created July 29, 2015 15:30
Show Gist options
  • Save kcdipesh/012f1c7fec5e965a92c7 to your computer and use it in GitHub Desktop.
Save kcdipesh/012f1c7fec5e965a92c7 to your computer and use it in GitHub Desktop.
This is a shim for IE8 to fulfil its Object create capability
if (!Object.create) {
Object.create = function (o) {
if (arguments.length > 1) {
throw new Error('Object.create implementation only accepts the first parameter.');
}
function F() {}
F.prototype = o;
return new F();
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment