SwVitaliy

Untitled

Apr 29th, 2012
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. function T(){ this.all.push(this) }
  2. >undefined
  3. T.prototype.all =[];
  4. >[]
  5. Utils.extend
  6. >function extend(Child, Parent)
  7. {
  8. var F = function() { };
  9. F.prototype = Parent.prototype;
  10. Child.prototype = new F();
  11. Child.prototype.constructor = Child;
  12. Child.superclass = Parent.prototype;
  13. }
  14.  
  15. function T1() { arguments.callee.superclass.constructor.apply(this, []) }
  16. >undefined
  17. Utils.extend(T1, T);
  18. >undefined
  19. new T1
  20. >T1
  21. new T1
  22. >T1
  23. T.prototype.all
  24. >[
  25. T1
  26. ,
  27. T1
  28. ]
Advertisement
Add Comment
Please, Sign In to add comment