Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /** Used for functional inheritance */
- Object.prototype.method = function(name, method, _super) {
- var that = this;
- if(_super) {
- var m = that[name];
- _super[name] = function() {
- return m.apply(that, arguments);
- };
- }
- this[name] = method;
- };
Add Comment
Please, Sign In to add comment