I want to create an inheritance function based on a prototype. I have this JavaScript:
Function.prototype.Inherits = function(parent) {
this.prototype = new parent();
this.prototype.constructor = this;
};
function Base() {};
function Foo() {
this.Inherits(Base);
};
I want a function that does the same as this:
Foo.prototype = new Base();
Foo.constructor = Base();