enum
VNode
pub enum VNode {
Element(VElement),
Text(String),
}A node in the rendered tree: an element, or text.
Variants
Methods
element
pub fn element(tag: &str) -> VNodeAn element with tag, and no attributes, handlers or children yet.
attr
pub fn attr(self, name: &str, value: impl Into<Value>) -> VNodeBuilder: set an attribute (no-op on text nodes).
on
pub fn on(self, event: &str, handler: Handler) -> VNodeBuilder: add an event handler (no-op on text nodes).
find_mut
pub fn find_mut(&mut self, path: &[usize]) -> Option<&mut VNode>The node at path below this one (empty: this node), to change it.