The replaceChild() method of the Node interface replaces a child node within the given (parent) node.
replaceChild()
external Node replaceChild( Node node, Node child, );