Function mt_dom::element [−][src]
pub fn element<NS, TAG, ATT, VAL>(
tag: TAG,
attrs: Vec<Attribute<NS, ATT, VAL>>,
children: Vec<Node<NS, TAG, ATT, VAL>>
) -> Node<NS, TAG, ATT, VAL> where
NS: PartialEq + Clone + Debug,
TAG: PartialEq + Clone + Debug,
ATT: PartialEq + Clone + Debug,
VAL: PartialEq + Clone + Debug,
Expand description
create a virtual node with tag, attrs and children
Example
use mt_dom::{Node,element,attr}; let div:Node<&'static str, &'static str, &'static str, &'static str> = element( "div", vec![attr("class", "container")], vec![], );