Macro silkenweb_inline_html::inline_html
source · inline_html!() { /* proc-macro */ }
Expand description
Include an HTML snippet from a string literal.
Take a string literal containing a single HTML element, and produce a
Node
expression. The Dom
type is not specified, so if it can’t be determined by type inference, you
may need to provide a type annotation.
See silkenweb_parse
for details on the parsing.
§Example
let node: Node = inline_html!("<p>Inline HTML</p>");
assert_eq!(node.to_string(), "<p>Inline HTML</p>");