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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
---
title: ChildNode
slug: Web/API/ChildNode
tags:
- API
- DOM
- Experimental
- Expérimental(2)
- NeedsTranslation
- TopicStub
translation_of: Web/API/ChildNode
---
<p>{{APIRef("DOM")}}</p>
<p>Интерфейс <code><strong>ChildNode</strong></code> содержит методы, специфичные для объектов {{domxref("Node")}}, которые имеют родителя.</p>
<p><code>ChildNode</code> это просто интерфейс и ни один объект этого типа не может быть создан; он реализуется объектами {{domxref("Element")}}, {{domxref("DocumentType")}} и {{domxref("CharacterData")}}.</p>
<h2 id="Properties">Properties</h2>
<p><em>There is neither inherited, nor specific property.</em></p>
<h2 id="Methods">Methods</h2>
<p><em>Отсутствуют унаследованные методы.</em></p>
<dl>
<dt>{{domxref("ChildNode.remove()")}} {{experimental_inline}}</dt>
<dd>Удаляет данный <code>ChildNode</code> из списка потомков его родителя.</dd>
<dt>{{domxref("ChildNode.before()")}} {{experimental_inline}}</dt>
<dd>Inserts a set of {{domxref("Node")}} or {{domxref("DOMString")}} objects in the children list of this <code>ChildNode</code>'s parent, just before this <code>ChildNode</code>. {{domxref("DOMString")}} objects are inserted as equivalent {{domxref("Text")}} nodes.</dd>
<dt>{{domxref("ChildNode.after()")}} {{experimental_inline}}</dt>
<dd>Inserts a set of {{domxref("Node")}} or {{domxref("DOMString")}} objects in the children list of this <code>ChildNode</code>'s parent, just after this <code>ChildNode</code>. {{domxref("DOMString")}} objects are inserted as equivalent {{domxref("Text")}} nodes.</dd>
<dt>{{domxref("ChildNode.replaceWith()")}} {{experimental_inline}}</dt>
<dd>Заменяет <code>ChildNode</code> в списке потомков его родителя набором {{domxref("Node")}} или {{domxref("DOMString")}} объектов. {{domxref("DOMString")}} objects are inserted as equivalent {{domxref("Text")}} nodes.</dd>
</dl>
<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', 'ChildNode')}}</td>
<td>{{Spec2('DOM WHATWG')}}</td>
<td>Интерфейс <code>ElementTraversal</code> разделён на {{domxref("ParentNode")}} и <code>ChildNode</code>. Свойства <code>previousElementSibling</code> и <code>nextElementSibling</code> теперь определены в последнем.<br>
The {{domxref("CharacterData")}} and {{domxref("DocumentType")}} implemented the new interfaces.<br>
Добавлены методы <code>remove()</code>, <code>before()</code>, <code>after()</code> и <code>replaceWith()</code>.</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="Polyfill">Polyfill</h2>
<p>External on github: <a href="https://github.com/seznam/JAK/blob/master/lib/polyfills/childNode.js">childNode.js</a></p>
<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("23.0")}}</td>
<td>9.0</td>
<td>10.0</td>
<td>4.0</td>
</tr>
<tr>
<td>Support on {{domxref("DocumentType")}} and {{domxref("CharacterData")}} {{experimental_inline}}</td>
<td>23.0</td>
<td>{{CompatGeckoDesktop("23.0")}}</td>
<td>{{CompatNo}}</td>
<td>16.0</td>
<td>{{CompatNo}}</td>
</tr>
<tr>
<td><code>remove()</code>{{experimental_inline}}</td>
<td>29.0</td>
<td>{{CompatGeckoDesktop("23.0")}}</td>
<td>{{CompatNo}}</td>
<td>16.0</td>
<td>{{CompatNo}}</td>
</tr>
<tr>
<td><code>before()</code>, <code>after()</code>, and <code>replaceWith()</code> {{experimental_inline}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</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>{{CompatGeckoMobile("23.0")}}</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>10.0</td>
<td>{{ CompatVersionUnknown() }}</td>
</tr>
<tr>
<td>Support on {{domxref("DocumentType")}} and {{domxref("CharacterData")}} {{experimental_inline}}</td>
<td>{{ CompatVersionUnknown() }}</td>
<td>{{CompatGeckoMobile("23.0")}}</td>
<td>{{CompatNo}}</td>
<td>16.0</td>
<td>{{CompatNo}}</td>
</tr>
<tr>
<td><code>remove()</code>{{experimental_inline}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatGeckoMobile("23.0")}}</td>
<td>{{CompatNo}}</td>
<td>16.0</td>
<td>{{CompatNo}}</td>
</tr>
<tr>
<td><code>before()</code>, <code>after()</code>, and <code>replaceWith()</code> {{experimental_inline}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatNo}}</td>
</tr>
</tbody>
</table>
</div>
<h2 id="See_also">See also</h2>
<ul>
<li>The {{domxref("ParentNode")}} pure interface.</li>
<li>
<div class="syntaxbox">Object types implementing this pure interface: {{domxref("CharacterData")}}, {{domxref("Element")}}, and {{domxref("DocumentType")}}.</div>
</li>
</ul>
|