Is it possible to use a method from the parent class in the overwritten version in my child element in javascript?

Is it possible to use a method from the parent class in the overwritten version in my child element in javascript?

+4
source share
3 answers

Yes:

ParentClass.prototype.methodName.call(this, arg1, arg2); 
+3
source

You can call the following in a rewritten version of a child class:

 ParentClass.prototype.methodYouAreOverwriting.call(this); 
0
source

If you are using a module template, check out this article: http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth

0
source

All Articles