Jump to navigation

Class: DOMcontentsubber

Numbas.jme.variables.DOMcontentsubber

new DOMcontentsubber(scope)

An object which substitutes JME values into HTML. JME expressions found inside text nodes are evaluated with respect to the given scope.

Parameters:
Name Type Description
scope Numbas.jme.Scope
Source:

Methods

findvars(element, scope) → {Array.<string>}

Find all variables which would be used when substituting into the given element.

Parameters:
Name Type Description
element Element
scope Numbas.jme.Scope

The scope to use for normalising names.

Returns:
Type Description
Array.<string>
Source:

subvars(element)

Substitute JME values into the given element and any children.

Parameters:
Name Type Description
element Element
Source: