Home Reference Source Repository

Typedef

Static Public Summary
public
public

Static Public

public BUILT_IN_TAGS: Object source

Properties:

NameTypeAttributeDescription
tpl-logger function

to append a console message

tpl-each function

to iterate over an array

tpl-text function

to create a text node

tpl-call function

to call an helpers with the current data value

Example:

tpl-logger
idomizer.compile(`<tpl-logger level="info" content="data.foo: {{data.foo}}" />`);
tpl-each and tpl-text
idomizer.compile(`
  <tpl-each items="data.values" item="value" index="i">
    <li tpl-key="value-{{i}}">
      <tpl-text value="{{value}}"/>
    </li>
  </tpl-each>
`);
tpl-call
let anotherRenderFunction = // antoher IncrementalDOM render function
idomizer.compile(`
  <tpl-call name="anotherRender"/>
`)(IncrementalDOM, {
  anotherRender: anotherRenderFunction
});

public OPTIONS: Object source

Properties:

NameTypeAttributeDescription
pretty boolean

Append a end of line character ('\n' ) after each statements.

evaluation RegExp
  • nullable: false

A RegExp to extracts expressions to evaluate.

attributeKey string
  • nullable: false

The value of the IncrementalDOM's key.

attributePlaceholder string
  • nullable: false

The flag to make the element acting as a placeholder.

varDataName string
  • nullable: false

The name of the variable exposing the data.

varHelpersName string
  • nullable: false

The name of the variable exposing the helpers.

selfClosingElements Array<string>
  • nullable: false

The list of self closing elements. (http://www.w3.org/TR/html5/syntax.html#void-elements)

tags BUILT_IN_TAGS
  • nullable: false

The built in and custom tags.