DOMNode->replaceChild() Replaces a child &reftitle.description; DOMNode DOMNode replaceChild DOMNodenewnode DOMNodeoldnode This function replaces the child oldnode with the passed new node. If the new node is already a child it will not be added a second time. If the replacement succeeds the old node is returned. &reftitle.parameters; newnode The new node. oldnode The old node. &reftitle.returnvalues; The old node of &false; if an error occur. &reftitle.exceptions; Throws DOMException if node cannot be replaced. &reftitle.seealso;