Html5 Theme / Client-Side Framework and Components |
By working together, the parts of the Client-Side Framework properly handle a Genero application.
The gwc namespace object includes the tk namespace object (gwc.tk) that contain a set of general purpose tools (classes and function) that help to create components.
var interrupter = tk.listenEvent(elt, 'click', myClickHandler);
Components are stored in the namespace object gwc.componentSet, located in the file components.js.
A component handles the interactive part of a HTML markup fragment. This fragment can be a whole template snippet or just a tiny part of the page. This mean that a single template snippet may be related to several components.
The bootstrap (bootstrap.xhtml) is code that runs before the Client-Side Framework and the application page are loaded. The bootstrap collects information such as browser and device capabilities. This information is transmitted to the Client-Side Framework through the cookie gwc_cookies=gwcUserAgentFeatures. The main snippet page is then able to read these information through the meta variable gwcUserAgentFeatures. The bootstrap has a userAgentFeaturesTests variable that contains the set of functions that collect information.