-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Not sure if we can rely on native super, it's likely it can't be the case, then I imagine it as:
this.super('methodName')();Where internal implementation could be similar to:
Base.prototype.super = function (propName) {
var currentObject = this, superObject, superValue;
while (!currentObject.hasOwnProperty(propName)) {
currentObject = Object.getPrototypeOf(currentObject);
if (!currentObject) return;
}
superObject = Object.getPrototypeOf(currentObject);
if (!superObject) return;
superValue = superObject[propName]; // TODO: Take into account getter case
if (typeof superValue === 'function') superValue = Function.prototype.bind.call(superValue, this);
return superValue;
};Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels