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 |
Methods
findvars(element) → {Array.<string>}
Find all variables which would be used when substituting into the given HTML node.
If the node is an element, use findvars_element
; if it's text, use findvars_text
.
Parameters:
Name | Type | Description |
---|---|---|
element |
Node |
Returns:
Type | Description |
---|---|
Array.<string> |
findvars_element(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> |