Tk Widgets in Javascript Paper Chapter 2

The initially implemented Tk widgets

TkWidget js Object

To hold all the relevant information for a Tk widget, a TkWidget js Object was implemented, which stores in its properties, for example, the widget name (e.g., .fr.b1), a reference to the DOM node, the type of the widget (for example Tk.WIDGET_TYPE_BUTTON), a reference to a javascript Object with properties for that instance of the widget, a list of allowed options for that widget, and a list of bind infos.

The javascript Objects for the above mentioned widgets are:

The instances for the widgets are implemented very similar to the implementation of itcl class objects as new commands. The javascript object used for this is TkObject js Object. It contains as properties the path name and a reference to the TkWidget js Object.

(Part of Tk Widgets in Javascript Paper)