Element.replaceChild

Element replaceChild(Element find, Element replace)

Replaces the element find, which must be a child of this, with the element replace, which must have no parent.

void replaceChild(Element find, Element[] replace)

Replaces the given element with a whole group.