Acess To This From Subobject In Javascript
How do I get access to the properties or method of the main object, from sub-obiect level two (sub3). If possible I would like to avoid solutions chaining return this. Obj = functi
Solution 1:
With your current syntax, you can't. Because for sub2
and sub3
, the this
variable is Obj.prototype.subobject
.
You have multiple choice:
Post a Comment for "Acess To This From Subobject In Javascript"