Struct sycamore::generic_node::dom_node::DomNode [−][src]
pub struct DomNode { /* fields omitted */ }
Expand description
Rendering backend for the DOM.
This API requires the following crate features to be activated: dom
Implementations
Trait Implementations
Create a marker (dummy) node with text content. For empty marker, prefer
GenericNode::marker
instead. Read more
Sets an attribute on a node.
Removes an attribute on a node.
Sets a property on a node.
Removes a property on a node.
Appends a child to the node’s children.
Get the first child of the node.
Insert a new child node to this node’s children. If reference_node
is Some
, the child
will be inserted before the reference node. Else if None
, the child will be inserted
at the end. Read more
Remove a child node from this node’s children.
Replace a child node from this node’s children with a new child node.
Insert a new node before this node.
Returns the parent node, or None
if detached.
Returns the next sibling, or None
if this node is the last sibling.
Remove this node from the tree.
Add a [EventHandler
] to the event name
.
Update inner text of the node. If the node has elements, all the elements are replaced with a new text node. Read more
Updates the inner html of the node.
The html will not be parsed in non-browser environments. This means that accessing methods
such as first_child
will return None
. Read more
Create a deep clone of the node.
Whether this rendering backend needs the hydration registry.
Create a marker (dummy) node. For DomNode
, this is implemented by creating an empty
comment node. This is used, for example, in Keyed
and
Indexed
for scenarios where you want to push a new item to the
end of the list. If the list is empty, a dummy node is needed to store the position of
the component. Read more
A boolean indicating whether this node is rendered in a browser context. Read more
Auto Trait Implementations
impl !RefUnwindSafe for DomNode
impl UnwindSafe for DomNode
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.