replaceChild
Insert a node before a given reference node in an element, effectively Node.prototype.replaceChild
.
mutate.replaceChild.call(parent, newChild, oldChild)
Parameters
- parent
{Node}
:The parent into which the newChild is inserted.
- newChild
{Node}
:The child which is inserted into the parent.
- oldChild
{Node}
:The child which is removed from the parent.
Returns
{Node}
:
The replaced child.