Function html_to_nodes
Source pub fn html_to_nodes<D: Dom>(html: &str) -> Vec<Node<D>>
Expand description
Convert an HTML fragment to Silkenweb nodes.
See the module documentation for details.
ยงExample
let html_fragment = "<p>Node 1</p><p>Node 2</p>";
let nodes: Vec<Node> = html_to_nodes(html_fragment);
assert_eq!(format!("{}{}", nodes[0], nodes[1]), html_fragment);