Class: CompiledTemplate

lib/core/renderer/program/CompiledTemplate.CompiledTemplate(program)

A render program's skeleton, parsed once and cloned thereafter.

Constructor

new CompiledTemplate(program)

Parameters:
Name Type Description
program object

A render program.

Source:

Members

elementPaths :Array:.<Array:.<number:>>

Index paths to each bound element, by marker id.

Type:
  • Array:.<Array:.<number:>>
Source:

failed :boolean

Set when the skeleton could not be prepared, so callers fall back rather than retrying a parse that will fail the same way.

Type:
  • boolean
Source:

program :object

Type:
  • object
Source:

prototype :DocumentFragment|null

The prototype tree every instance is cloned from.

Type:
  • DocumentFragment | null
Source:

textPaths :Array:.<Array:.<number:>>

Index paths to each dynamic text node, by marker id.

Type:
  • Array:.<Array:.<number:>>
Source:

Methods

instantiate() → {Object|null}

Clones the prototype and resolves every binding target in the clone.

Source:
Returns:

The instance's nodes, or null when the template could not be prepared.

Type
Object | null