Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function T(){ this.all.push(this) }
- >undefined
- T.prototype.all =[];
- >[]
- function T1() { console.log( arguments.callee.superclass ) }
- >undefined
- Utils.extend(T1, T);
- >undefined
- Utils.extend
- >function extend(Child, Parent)
- {
- var F = function() { };
- F.prototype = Parent.prototype;
- Child.prototype = new F();
- Child.prototype.constructor = Child;
- Child.superclass = Parent.prototype;
- }
- function T2(){ console.log( arguments.callee.superclass ) }
- >undefined
- Utils.extend(T2, T1);
- >undefined
- new T
- >T
- new T1
- >T
- >T1
- new T2
- >F
- >T2
Advertisement
Add Comment
Please, Sign In to add comment