Function replaceNode

  • Replace the node oldNode in the tree with newNode.

    If p is the parent of oldNode, this function needs to find a property propName of p such that p[propName] === oldNode.

    Once found, it re-assigns p[propName] = newNode and sets newNode.parent=p using acceptChildren. Since children is a getter there is nothing further to do.

    Parameters

    Returns void

Generated using TypeDoc