0%
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| function Klass(Parent, props) { var Child, F, i;
Child = function(){ if (Child.uber && Child.uber.hasOwnProperty('__construct')) { Child.uber.__construct.apply(this, arguments); }
if (Child.prototype.hasOwnProperty('__construct')) { Child.prototype.__construct.apply(this, arguments); } };
Parent = Parent || Object; F = function(){}; F.prototype = Parent.prototype; Child.prototype = new F(); Child.uber = Parent.Prototype; Child.prototype.constructor = Child;
for (i in props) { if (props.hasOwnProperty(i)){ Child.prototype[i] = props[i]; } }
return Child; }
|