Skip to main content

append_child

Function append_child 

Source
pub fn append_child(
    doc: &mut BaseDocument,
    parent: NodeId,
    child: NodeId,
) -> Result<NodeId>
Expand description

parent.appendChild(child), returning the child.

The child is detached from any current parent first, which is what makes “move to the end of the same parent” behave.

A runtime that supports custom elements must run its upgrade step after this call: insertion is when connectedCallback is due, and constructing a guest object is not something this crate can do.