molily: Typecasting

Beitrag lesen

SubClass.protptype.supr = BaseClass.prototype;

Tippfehler protptype

SubClass.prototype.foo = function(){ /* some code */ };

var myInstance = new BaseClass();

// Die nächste Zeile ist Pseudocode, doch genau dafür suche ich gerade eine echte Lösung

(myInstance AS SubClass).foo();

BaseClass.prototype.foo.call(myInstance)
myInstance.supr.foo.call(MyInstance)

Allerdings verstehe ich nicht, wie das dein Problem löst…

Mathias