ClientPageRenderer 

Client-side page renderer. The renderer attempts to reuse the markup sent by server if possible.

Kind: global class


new ClientPageRenderer(factory, Helper, ReactDOM, settings, window) 

Initializes the client-side page renderer.

Param Type Description
factory PageRendererFactory Factory for receive $Utils to view.
Helper vendor.$Helper The IMA.js helper methods.
ReactDOM vendor.ReactDOM React framework instance to use to render the page on the client side.
settings Object.<string, \*> The application setting for the current application environment.
window Window Helper for manipulating the global object (window) regardless of the client/server-side environment.

clientPageRenderer._firstTime : boolean 

Flag signalling that the page is being rendered for the first time.

Kind: instance property of ClientPageRenderer


clientPageRenderer._window : Window 

Helper for manipulating the global object (window) regardless of the client/server-side environment.

Kind: instance property of ClientPageRenderer


clientPageRenderer._viewContainer : HTMLElement 

The HTML element containing the current application view for the current route.

Kind: instance property of ClientPageRenderer


clientPageRenderer.mount() 

Kind: instance method of ClientPageRenderer


clientPageRenderer.update() 

Kind: instance method of ClientPageRenderer


clientPageRenderer.unmount() 

Kind: instance method of ClientPageRenderer


clientPageRenderer._handleError(error) 

Show error to console in $Debug mode and re-throw that error for other error handler.

Kind: instance method of ClientPageRenderer
Throws:

  • Error Re-throws the handled error.
Param Type
error Error

clientPageRenderer._patchPromisesToState(controller, patchedPromises) 

Patch promise values to controller state.

Kind: instance method of ClientPageRenderer

Param Type
controller ControllerDecorator
patchedPromises Object.<string, Promise.<\*>>

clientPageRenderer._renderToDOM(controller, view, routeOptions) 

Renders the current route to DOM.

Kind: instance method of ClientPageRenderer

Param Type Description
controller ControllerDecorator  
view function  
routeOptions Object The current route options.

clientPageRenderer._separatePromisesAndValues(dataMap) ⇒ Object 

Separate promises and values from provided data map. Values will be use for default page state. Promises will be patched to state after their resolve.

Kind: instance method of ClientPageRenderer
Returns: Object - Return separated promises and other values.

Param Type Description
dataMap Object.<string, \*> A map of data.

clientPageRenderer._updateMetaAttributes(metaManager) 

Updates the title and the contents of the meta elements used for SEO.

Kind: instance method of ClientPageRenderer

Param Type Description
metaManager MetaManager meta attributes storage providing the new values for page meta elements and title.

clientPageRenderer._updateMetaNameAttributes(metaManager) 

Updates the contents of the generic meta elements used for SEO.

Kind: instance method of ClientPageRenderer

Param Type Description
metaManager MetaManager meta attributes storage providing the new values for page meta elements and title.

clientPageRenderer._updateMetaPropertyAttributes(metaManager) 

Updates the contents of the specialized meta elements used for SEO.

Kind: instance method of ClientPageRenderer

Param Type Description
metaManager MetaManager meta attributes storage providing the new values for page meta elements and title.

clientPageRenderer._updateMetaLinkAttributes(metaManager) 

Updates the href of the specialized link elements used for SEO.

Kind: instance method of ClientPageRenderer

Param Type Description
metaManager MetaManager meta attributes storage providing the new values for page meta elements and title.