Call function in parent class
by Mohan[ Edit ] 2012-09-20 23:55:10
Call function in parent class
toto.prototype = new function() {
this.a = function() {
Print(456)
}
};
function toto() {
this.a=function(){
Print(123)
toto.prototype.a.call(this); // or: this.__proto__.a();
}
}
var o = new toto;
o.a();
prints:
123
456