Access to super method and constructor like Java.
npm install superclassYou can access to method and constructor of super class like Java.
node:
//add option "--harmony_proxies"
require('superclass');
web:
Access to constructor:
function A(message) {
this.message = message;
}
function B() {
this.super('hello!');
}
B.prototype = Object.create(A.prototype);
Access to method:
A.prototype.foo = function() {
return '#' + this.message + '#';
};
B.prototype.foo = function() {
return '(' + this.super.foo() + ')';
};