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
Genetics = { | |
top: window, | |
// builds a descendant object | |
// overridden functions get wrapped with this._super prop pointing to base func | |
// inherits prototype chain | |
originate: function(name, def) { | |
var top = Genetics.top; | |
top[name] = def.init; | |
delete def.init; | |
top[name].prototype = def; |