Macro dominator::dom_builder
source · macro_rules! dom_builder { ($node:expr, { $($methods:tt)* }) => { ... }; }
Expand description
Converts an existing DOM node into a dominator Dom
node.
This is useful for applying DomBuilder
methods to an already-existing DOM node (for example a third-party library).
The first argument is the DOM node, and the second argument is a block of method calls.
Inside of the block you can use DomBuilder
methods:
dom_builder!(my_dom_node, {
.class("foo")
.style("color", "green")
.style_signal("width", ...)
})
The block uses the apply_methods!
macro, see the docs for apply_methods!
for more details.