super question

Kris Zyp kriszyp at
Fri Jun 8 10:49:05 PDT 2007

I was wondering if the *super* keyword causes base limiting only in classes,
or in delegate chains as well. For example:
function MyObj() { }
MyObj.prototype.formatValue = function() { return "value: " + this.value };
var myObj = new MyObj;
myObj.value = 10;
myObj.formatValue = function() { return "The value is: " + super.formatValue();

If I called myObj.formatValue() would it go up the delegate chain to call a
super formatValue? Would calling myObj.formatValue() return "The value is:
value: 10" (as it would seem logical to me that it would)? Or does super
only apply to super/sub classes?
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Es4-discuss mailing list