Spaces:
Running
Running
File size: 255 Bytes
87b3b3a |
1 2 3 4 5 6 7 8 9 10 |
/**
* Sets prototype of this function to an instance of parent function
* @param {function} parent
*/
Function.prototype.extend = function(parent) {
this.prototype = Object.create(parent.prototype);
this.prototype.constructor = this;
return this;
}
|