Function mt_dom::element_ns
source · pub fn element_ns<Ns, Tag, Leaf, Att, Val>(
namespace: Option<Ns>,
tag: Tag,
attrs: impl IntoIterator<Item = Attribute<Ns, Att, Val>>,
children: impl IntoIterator<Item = Node<Ns, Tag, Leaf, Att, Val>>,
self_closing: bool
) -> Node<Ns, Tag, Leaf, Att, Val>
Expand description
create a virtual node with namespace, tag, attrs and children
§Example
use mt_dom::{Node,element_ns,attr};
let svg:Node<&'static str, &'static str, (), &'static str, &'static str> =
element_ns(
Some("http://www.w3.org/2000/svg"),
"svg",
vec![attr("width","400"), attr("height","400")],
vec![],
false
);