ChildNode

The ChildNode mixin contains methods and properties that are common to all types of Node objects that can have a parent. It's implemented by Element, DocumentType, and CharacterData objects.

Properties

There are neither inherited, nor specific properties.

Methods

There are no inherited methods.

ChildNode.remove()
Removes this ChildNode from the children list of its parent.
ChildNode.before()
Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just before this ChildNode. DOMString objects are inserted as equivalent Text nodes.
ChildNode.after()
Inserts a set of Node or DOMString objects in the children list of this ChildNode's parent, just after this ChildNode. DOMString objects are inserted as equivalent Text nodes.
ChildNode.replaceWith()
Replaces this ChildNode in the children list of its parent with a set of Node or DOMString objects. DOMString objects are inserted as equivalent Text nodes.

Specifications

No specification found

No specification data found for api.ChildNode.
Check for problems with this page or contribute a missing spec_url to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

Polyfill

External on GitHub: childNode.js

Browser compatibility

No compatibility data found for api.ChildNode.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.

See also