After this call, the child's parent, previousSibling, and
nextSibling references are cleared, symmetric with setParent. If a
tree is provided, the child and its descendants are also purged from
the tree's id-to-node index so that Tree.getNode no longer
returns the detached subtree. Otherwise the index entries persist and
the caller is responsible for cleanup (e.g., via tree.removeNode).
Detach the given
childfrom theparent.After this call, the child's
parent,previousSibling, andnextSiblingreferences are cleared, symmetric withsetParent. If atreeis provided, the child and its descendants are also purged from the tree's id-to-node index so that Tree.getNode no longer returns the detached subtree. Otherwise the index entries persist and the caller is responsible for cleanup (e.g., viatree.removeNode).