Skip to main content

html_with_config

Macro html_with_config 

Source
html_with_config!() { /* proc-macro */ }
Expand description

Build a VirtualNode from a token stream.

Takes one or more comma-separated settings to configure, followed by a ;, followed by by HTML.

§Examples


// Generates a `VirtualNode::<web_sys::Window>`
let node = html_with_config! {
    real_dom = web_sys::Window;
    <div> hello world </div>
};

// Generates a `VirtualNode::<()>`
let node = html_with_config! {
    real_dom = ();
    <div> hello world </div>
};