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.
There is no inherited property.
NonDocumentTypeChildNode.previousElementSibling
Read only
Element
immediately prior to this node in its parent's children list, or null
if there is no Element
in the list prior to this node.NonDocumentTypeChildNode.nextElementSibling
Read only
Element
immediately following this node in its parent's children list, or null
if there is no Element
in the list following this node.There is neither inherited, nor specific method.
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 . |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | 1 | Yes | 3.5 | 9 | 10 | 4 |
Support (on CharacterData ) |
1 | Yes | 25 | 9 | 10 | 4 |
nextElementSibling |
4 | Yes | 3.5 | 9 | 10 | 4 |
previousElementSibling |
4 | Yes | 3.5 | 9 | 10 | 4 |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | Yes | Yes | 4 | 10 | Yes | ? |
Support (on CharacterData ) |
Yes | Yes | Yes | 25 | 10 | Yes | ? |
nextElementSibling |
Yes | Yes | Yes | 4 | 10 | Yes | ? |
previousElementSibling |
Yes | Yes | Yes | 4 | 10 | Yes | ? |
ParentNode
and ChildNode
pure interface.CharacterData
, and Element
.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/NonDocumentTypeChildNode