Overriding methods in JavaScript

I think * know how to override a method in JavaScript, but how to I call the inherited method, and is this polymorphism actually working, or will I run into problems as per this thread?

http://forum.unity3d.com/viewtopic.php?p=96265#96265

i.e. if I have Foobar, a subclass of Foo, and it’s in a collection Foo[ ], if someone calls Foo.doFoo(), will Foobar’s version of doFoo() get called properly?

Bueller, Bueller? I mean Freyr?

You need the virtual keyword.

where do I use virtual?

Note that my problem is NOT overriding the method, it’s calling the overridden method from within the overriding method.

E.g. I might want to call a parent class’s Start() from the subclass’s Start().

Hmm… posted to wrong thread … ignore (can’t delete?)

Ah, that what’s I get for skimming.

You should be able to call super(), although I’m not sure offhand if that only applies to constructors…

More info on this here.