← Back to release summary

New DOM node methods: prepend, append, before, after, replaceWith

Category
DOM
Type
New or changed feature
Status
Enabled by default (Chrome 54)
Intent stage
None

Summary

The DOM standard provides a set of convenience methods for working with DOM Node trees: ParentNode.prepend(), ParentNode.append(), ChildNode.before(), ChildNode.after(), ChildNode.replaceWith(). Removal of the flag is anticipated in Chrome 54.

Standards & signals

Docs: https://dom.spec.whatwg.org/#parentnode https://developer.mozilla.org/en-US/docs/Web/API/ChildNode https://developer.mozilla.org/en-US/docs/Web/API/ParentNode

View on chromestatus.com