Skip to content

Instantly share code, notes, and snippets.

@safe1981
Created March 15, 2012 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save safe1981/2042405 to your computer and use it in GitHub Desktop.
Save safe1981/2042405 to your computer and use it in GitHub Desktop.
Javascript: Object.create를 지원하지 않는 브라우저를 위한 Polyfill
//Polyfill for browsers that don't support Object.create
if ( typeof Object.create !== 'function' ) {
Object.create = function ( obj ) {
function F();
F.prototype = obj;
return new F();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment