Created
March 15, 2012 06:15
-
-
Save safe1981/2042405 to your computer and use it in GitHub Desktop.
Javascript: Object.create를 지원하지 않는 브라우저를 위한 Polyfill
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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