[][src]Macro dom_renderer::end_elem

macro_rules! end_elem {
    ($x:expr) => { ... };
    ($x:expr; $(($a:expr,$v:expr)),+) => { ... };
    ($x:expr; $(($a:expr,$v:expr),)+) => { ... };
    ($x:expr; $(($a:expr,$v:expr)),+; $e:expr) => { ... };
    ($x:expr; $e:expr) => { ... };
}

crates DOM Element that have a single text node.

end_elem!(tag; attrs..; text) is extracted as elem!(tag; attrs..; domtxt!(text))

Example

Tag, attribute lists, and text are separated by ';'

Attributes and child elements can be omitted.

use dom_renderer::*;
assert_eq!("<title>Title</title>", end_elem!("title"; "Title").render());