I am doing Object Oriented programming in JavaScript without Prototype/jQuery (I use jQuery for other stuff). It has been working fine so far, but I ran into an issue with i
B.prototype = new A();
this creates only one instance of A for every B.
You might consider doing sth like
B = function()
{
this.$super = new A();
}
B.prototype.doStuff = function()
{
return this.$super(args);
}
C = function ()
{
this.$super = new B();
}
C.prototype.doStuff = function()
{
return this.$super(args);
}
C.prototype.whoIsMyGrandParent = function()
{
return this.$super.$super;
}
Javascript has NO real inheritation