Constructor/Node

The node is a direct descendent of the element and the most basic
type of element capable of containing other elements.

Methods

$node->adopt($el)

Adopts an element. The element will be appended to the node's ->children, and
the element's ->parent will be set to the node. If the node already belongs to
another element, that relationship will be nullified. Conveniently returns the
adopted element.

# you would see something like this if you were
# say, creating an if {} inside of a method {}
$c->{node} = $c->{node}->adopt($if);

$el: any element to be adopted by the node.

$node->abandon($el)

Abandons a child element. The element will be removed from the node's
->children, and the element's ->parent will be unset. Unless the element is
then injected into the tree somewhere else, it will be disposed of. Conveniently
returns the abandoned element.