Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count = 0
- >0
- B.prototype.init = function(){ if (++count < 100) console.log('B.prototype.init.apply', this);
- if (arguments.callee === this.constructor.super.init) { console.log('stop!!!'); return; }
- this.constructor.super.init.apply(this,arguments);
- this.extra = 'im B';
- }
- >function (){ if (++count < 100) console.log('B.prototype.init.apply', this);
- >
- >if (arguments.callee === this.constructor.super.init) { console.log('stop!!!'); return; }
- >this.constructor.super.init.apply(this,arguments);
- >
- >this.extra = 'im B';
- >
- >
- >
- >}
- (new C).init();
- >C.prototype.init.apply
- >C
- >B.prototype.init.apply
- >C
- >stop!!!
Advertisement
Add Comment
Please, Sign In to add comment