Hello,
I have been reading the documentation for the Component infrastructure like Attribute, Base, Plugin and Widget.
I keep coming across this concept of creating a base class and then extending, augmenting or plugin it, the code looks something like this:
CODE
function MyClass(config) {
// Invoke Base constructor, passing through arguments
MyClass.superclass.constructor.apply(this, arguments);
}
Can someone please explain this function to me, how does it work?
I am familiar with constructor and apply but I cannot find an explanation of what is the superclass property or method.
What is superclass? Is it a YUI property or is it a JavaScript property?
What is the context of the argument this?
Is arguments an array and what value does it hold?
Thanks, I will appreciate it if someone will point me in the right direction