html5ever::tree_builder

Function create_element

Source
pub fn create_element<Sink>(
    sink: &Sink,
    name: QualName,
    attrs: Vec<Attribute>,
) -> <Sink as TreeSink>::Handle
where Sink: TreeSink,
Expand description

A constructor for an element.

ยงExamples

Create an element like <div class="test-class-name"></div>: