1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
---
title: NonDocumentTypeChildNode
slug: conflicting/Web/API/Element_861159909c20acebf8e506c3bb0e2f7e
tags:
- API
- DOM
- Interface
- NeedsTranslation
- Reference
- TopicStub
translation_of: Web/API/NonDocumentTypeChildNode
original_slug: Web/API/NonDocumentTypeChildNode
---
<div>{{APIRef("DOM")}}</div>
<p>The <code><strong>NonDocumentTypeChildNode</strong></code> interface contains methods that are particular to {{domxref("Node")}} objects that can have a parent, but not suitable for {{domxref("DocumentType")}}.</p>
<p><code>NonDocumentTypeChildNode</code> is a raw interface and no object of this type can be created; it is implemented by {{domxref("Element")}}, and {{domxref("CharacterData")}} objects.</p>
<h2 id="Properties">Properties</h2>
<p><em>There is no inherited property.</em></p>
<dl>
<dt>{{domxref("NonDocumentTypeChildNode.previousElementSibling")}} {{readonlyInline}}</dt>
<dd>Returns the {{domxref("Element")}} immediately prior to this node in its parent's children list, or <code>null</code> if there is no {{domxref("Element")}} in the list prior to this node.</dd>
<dt>{{domxref("NonDocumentTypeChildNode.nextElementSibling")}} {{readonlyInline}}</dt>
<dd>Returns the {{domxref("Element")}} immediately following this node in its parent's children list, or <code>null</code> if there is no {{domxref("Element")}} in the list following this node.</dd>
</dl>
<h2 id="Methods">Methods</h2>
<p><em>There is neither inherited, nor specific method.</em></p>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('DOM WHATWG', '#interface-childnode', 'NonDocumentTypeChildNode')}}</td>
<td>{{Spec2('DOM WHATWG')}}</td>
<td>Splitted the <code>ElementTraversal</code> interface in {{domxref("ParentNode")}}, {{domxref("ChildNode")}}, and <code>NonDocumentTypeChildNode</code>. The <code>previousElementSibling</code> and <code>nextElementSibling</code> are now defined on the latter.<br>
The {{domxref("CharacterData")}} and {{domxref("Element")}} implemented the new interfaces.</td>
</tr>
<tr>
<td>{{SpecName('Element Traversal', '#interface-elementTraversal', 'ElementTraversal')}}</td>
<td>{{Spec2('Element Traversal')}}</td>
<td>Added the initial definition of its properties to the <code>ElementTraversal</code> pure interface and use it on {{domxref("Element")}}.</td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>Chrome</th>
<th>Firefox (Gecko)</th>
<th>Internet Explorer</th>
<th>Opera</th>
<th>Safari</th>
</tr>
<tr>
<td>Basic support (on {{domxref("Element")}})</td>
<td>1.0</td>
<td>{{CompatGeckoDesktop("1.9.1")}}</td>
<td>9.0</td>
<td>10.0</td>
<td>4.0</td>
</tr>
<tr>
<td>Support (on {{domxref("CharacterData")}})</td>
<td>1.0</td>
<td>{{CompatGeckoDesktop("25.0")}} [1]</td>
<td>9.0</td>
<td>10.0</td>
<td>4.0</td>
</tr>
</tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>Android</th>
<th>Firefox Mobile (Gecko)</th>
<th>IE Mobile</th>
<th>Opera Mobile</th>
<th>Safari Mobile</th>
</tr>
<tr>
<td>Basic support (on {{domxref("Element")}})</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>{{CompatGeckoDesktop("1.9.1")}}</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>10.0</td>
<td>{{ CompatVersionUnknown() }}</td>
</tr>
<tr>
<td>Support (on {{domxref("CharacterData")}})</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>{{CompatGeckoDesktop("25.0")}}</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>10.0</td>
<td>{{ CompatVersionUnknown() }}</td>
</tr>
</tbody>
</table>
</div>
<p>[1] Firefox 25 also added the two properties defined here on {{domxref("DocumentType")}}, this was removed in Firefox 28 due to compatibility problems, and led to the creation of this new pure interface.</p>
<h2 id="See_also">See also</h2>
<ul>
<li>The {{domxref("ParentNode")}} and {{domxref("ChildNode")}} pure interface.</li>
<li>
<div class="syntaxbox">Object types implementing this pure interface: {{domxref("CharacterData")}}, and {{domxref("Element")}}.</div>
</li>
</ul>
|