Created
April 2, 2013 01:25
-
-
Save jonathanmarvens/5289225 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
if ( ! ( | |
Object.create && | |
( {} ).toString.call( Object.create ) === '[object Function]' | |
) ) { | |
Object.create = function ( members ) { | |
function Class() {} | |
Class.prototype = members; | |
return ( new Class() ); | |
}; | |
} |
This file contains hidden or 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
Object.create&&"[object Function]"==={}.toString.call(Object.create)||(Object.create=function(a){function b(){}return b.prototype=a,new b}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment