Skip to main content

substitute_element

Function substitute_element 

Source
pub fn substitute_element(template: &Element, scope: &Scope<'_>) -> Element
Expand description

Walk a template subtree, resolving every placeholder in its string-valued attributes and its text against scope.

The result is one instance of the template. Nothing else about the element changes: a caller that needs the CSS cascade re-run over the instance runs it afterwards, because what a rule matches depends on the id and class values that landed here.