Function sauron_core::html::html_element_self_closing [−][src]
pub fn html_element_self_closing<MSG>(
tag: &'static str,
attrs: Vec<Attribute<MSG>>,
children: Vec<Node<MSG>>,
self_closing: bool
) -> Node<MSG>
Expand description
Create a self closing html element.
Examples
ⓘ
use sauron::prelude::*;
let photo:Node<()> = html_element_self_closing("img", vec![class("pic")], vec![], true);
assert_eq!(node!{<img class="pic"/>}, photo);