DOMChildNode::replaceWith

Replaces the node with new nodes

&reftitle.description; public `void` `DOMChildNode::replaceWith` ``DOMNode``string```nodes`

Replaces the node with new `nodes`.

&reftitle.parameters;

`nodes`

- The replacement nodes. Strings are automatically converted to text nodes.

&reftitle.returnvalues;

&return.void;

&reftitle.errors;
&dom.errors.hierarchy.parent; &dom.errors.wrong_document;
&reftitle.changelog;

&Version; | &Description;
8.3.0 | Calling this method on a node without a parent is now a no-op to align the behaviour with the DOM specification. &dom.changelog.previous_hierarchy_exception;

&reftitle.seealso;

- `DOMChildNode::after`
- `DOMChildNode::before`
- `DOMChildNode::remove`
- `DOMNode::replaceChild`