pub fn replace_child(
doc: &mut BaseDocument,
parent: NodeId,
new_node: NodeId,
old_node: NodeId,
) -> Result<NodeId>Expand description
parent.replaceChild(new_node, old_node), returning the replaced node.
Argument order follows the DOM method: new first, old second. The return is
old_node, which is what the DOM specifies and what upstream returns.