My own super implementation (accessing unknwon super)
JavaScript
class A {
constructor (value) {
this._a = true;
if (undefined !== value) {
this._value = value;
}
}
getValue () {
return this._value;
}
}
class B extends A {
constructor () {
super("b");
this._b = true;
}
getValue () {
return super.getValue().toUpperCase();
}
getSuperGetValue () {
return super.getValue2;
}
}
function log (text) {
var line = document.createElement("div");
line.appendChild(document.createTextNode(text));
document.body.appendChild(line);
}
var b = new B();
var superGetValue = b.getSuperGetValue();
log("superGetValue is a " + typeof superGetValue);