replaceChildren

open fun replaceChildren(vararg nodes: Node)(source)

Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.

Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.

MDN Reference


open fun replaceChildren(vararg nodes: String)(source)