Element.appendChild

Element appendChild(Element e)

Appends the given element to this one. If it already has a parent, it is removed from that tree and moved to this one.

See_also: https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild

History

Prior to 1 Jan 2020 (git tag v4.4.1 and below), it required that the given element must not have a parent already. This was in violation of standard, so it changed the behavior to remove it from the existing parent and instead move it here.