Guest User

Untitled

a guest
Jan 24th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. /** Used for functional inheritance */
  2. Object.prototype.method = function(name, method, _super) {
  3. var that = this;
  4. if(_super) {
  5. var m = that[name];
  6. _super[name] = function() {
  7. return m.apply(that, arguments);
  8. };
  9. }
  10. this[name] = method;
  11. };
Add Comment
Please, Sign In to add comment