The NonDocumentTypeChildNode interface contains methods that are particular to Node objects that can have a parent, but not suitable for DocumentType.
NonDocumentTypeChildNode is a raw interface and no object of this type can be created; it is implemented by Element, and CharacterData objects.
Properties
There are no inherited properties.
NonDocumentTypeChildNode.previousElementSiblingRead only- Returns the
Elementimmediately prior to this node in its parent's children list, ornullif there is noElementin the list prior to this node. NonDocumentTypeChildNode.nextElementSiblingRead only- Returns the
Elementimmediately following this node in its parent's children list, ornullif there is noElementin the list following this node.
Methods
There are neither inherited nor specific methods.
Specifications
| Specification | Status | Comment |
|---|---|---|
| DOM The definition of 'NonDocumentTypeChildNode' in that specification. |
Living Standard | Splitted the ElementTraversal interface in ParentNode, ChildNode, and NonDocumentTypeChildNode. The previousElementSibling and nextElementSibling are now defined on the latter.The CharacterData and Element implemented the new interfaces. |
| Element Traversal Specification The definition of 'ElementTraversal' in that specification. |
Obsolete | Added the initial definition of its properties to the ElementTraversal pure interface and use it on Element. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
Basic support (on Element) | Chrome Full support 1 | Edge Full support 12 | Firefox Full support 3.5 | IE Full support 9 | Opera Full support 10 | Safari Full support 4 | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android Full support 4 | Opera Android Full support 10.1 | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
Support (on CharacterData) | Chrome Full support 1 | Edge Full support ≤18 | Firefox Full support 25 | IE No support No | Opera Full support 10 | Safari Full support 4 | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android Full support 25 | Opera Android Full support 10.1 | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
nextElementSibling | Chrome Full support 4 | Edge
Full support
12
| Firefox Full support 3.5 | IE
Partial support
9
| Opera Full support 10 | Safari Full support 4 | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android Full support 4 | Opera Android Full support 10.1 | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
previousElementSibling | Chrome Full support 4 | Edge
Full support
12
| Firefox Full support 3.5 | IE
Partial support
9
| Opera Full support 10 | Safari Full support 4 | WebView Android Full support Yes | Chrome Android Full support Yes | Firefox Android Full support 4 | Opera Android Full support 10.1 | Safari iOS Full support Yes | Samsung Internet Android Full support Yes |
Legend
- Full support
- Full support
- Partial support
- Partial support
- No support
- No support
- See implementation notes.
- See implementation notes.
See also
- The
ParentNodeandChildNodepure interface. -
Object types implementing this pure interface:
CharacterData, andElement.
