replaceWith method
Removes an element from the tree, and replaces it with otherElement
.
Returns the element that was replaced.
If you want to pass Node
instead Bs4Element, you can do it via
bs4element.element.replaceWith(node)
.
Implementation
@override
Bs4Element replaceWith(Bs4Element otherElement) =>
(_element.replaceWith(otherElement._element) as Element).bs4;