gara - Javascript Toolkit

Internals

Widgets

Widgets and DOMNodes

There is a connection betweend widgets and DOMNodes. Every DOMNode that belongs to the widget and is created in their _create Method is placed a property with a backreference to the wiget. Even though, if there is an associated control, this is also referenced in the DOMNode:

// control widget
DOMNode.widget = this;
DOMNode.control = this;

// item
DOMNode.widget = this;
DOMNode.control = this._control;