Home Manual Reference Source Repository
import {Renderer} from 'ug-layout/dom/Renderer'
public class | source

Renderer

Renders the layout.

Constructor Summary

Public Constructor
public

constructor(_document: Document, _patch: Patch)

Creates an instance of Renderer.

Member Summary

Public Members
public

Method Summary

Public Methods
public

Destroys the renderer.

public

detach()

Detatches the renderer and it's DOM node from the containing element.

public

initialize(containerEl: Node)

Initializes the renderer with the containing DOM element to mount to.

public

render(): void

Updates the DOM with the current state of the renderable tree.

public

reset()

Resets the render state.

public

setContainer(containerEl: *)

public

useNodeGenerator(fn: function(): VNode)

Sets a the function that generates the virtual DOM tree.

Public Constructors

public constructor(_document: Document, _patch: Patch) source

Creates an instance of Renderer.

Params:

NameTypeAttributeDescription
_document Document
_patch Patch

Public Members

public rendered: * source

Public Methods

public destroy() source

Destroys the renderer.

public detach() source

Detatches the renderer and it's DOM node from the containing element.

public initialize(containerEl: Node) source

Initializes the renderer with the containing DOM element to mount to.

Params:

NameTypeAttributeDescription
containerEl Node

public render(): void source

Updates the DOM with the current state of the renderable tree.

Return:

void

public reset() source

Resets the render state. A full rerender of the DOM will apply on the next render.

public setContainer(containerEl: *) source

Params:

NameTypeAttributeDescription
containerEl *

public useNodeGenerator(fn: function(): VNode) source

Sets a the function that generates the virtual DOM tree.

Params:

NameTypeAttributeDescription
fn function(): VNode