The Client Framework 2 places some restrictions on the organization of the JavaScript code. The JS code can be included in the page from script modules, or can be generated during the page processing and embedded in the page. The scripts from modules can create global variables, methods, and objects, but must not create any objects that relate to the specific elements in the page. If the script needs to do that, for example, needs to add common components for a header or a navigation bar, then it must add them into the appropriate following phase. The scripts embedded in the page are executed after the page has completed loading and are split into three phases.
The Client Framework 2 places some restrictions on the organization of the JavaScript code. The JS code can be included in the page from script modules, or can be generated during the page processing and embedded in the page. The scripts from modules can create global variables, methods, and objects, but must not create any objects that relate to the specific elements in the page. If the script needs to do that, for example, needs to add common components for a header or a navigation bar, then it must add them into the appropriate following phase. The scripts embedded in the page are executed after the page has completed loading and are split into three phases.
The code executed in this phase is responsible for creating, registering and associating objects with the relevant elements in the markup. The code must not attempt to resolve references to other components as they may not have been created yet.
The code executed in this phase is responsible for linking components together by resolving references and updating components. It must not attempt to start any components as the necessary links may not have been created yet.
The code executed in this phase is responsible for starting any components that must be started.
The cf2:ConstructionComponent component provides support for constructing the Client Framework 2 XDIME pages.