wt2html/Frame~Frame()

The Frame object

A frame represents a template expansion scope including parameters passed to the template (args). It provides a generic 'expand' method which expands / converts individual parameter values in its scope. It also provides methods to check if another expansion would lead to loops or exceed the maximum expansion depth.

Show:

Constructor

new Frame()

...

Methods

expand() → {Promise}

Expand / convert a thunk (a chunk of tokens not yet fully expanded).

Expand / convert a thunk (a chunk of tokens not yet fully expanded).

XXX: Support different input formats, expansion phases / flags and more output formats.

Source:
Returns:

A promise which will be resolved with the expanded chunk of tokens.

Type
Promise

loopAndDepthCheck(title)

Check if expanding a template would lead to a loop, or would exceed the maximum expansion depth.

Check if expanding a template would lead to a loop, or would exceed the maximum expansion depth.

Parameters:
Name Type Description
title string
Source:

newChild()

Create a new child frame.

Create a new child frame.

Source: