aboutsummaryrefslogtreecommitdiff
path: root/files/de/web/api/childnode
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
commit4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch)
treed4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/de/web/api/childnode
parent33058f2b292b3a581333bdfb21b8f671898c5060 (diff)
downloadtranslated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.gz
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.bz2
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.zip
initial commit
Diffstat (limited to 'files/de/web/api/childnode')
-rw-r--r--files/de/web/api/childnode/index.html190
-rw-r--r--files/de/web/api/childnode/remove/index.html97
2 files changed, 287 insertions, 0 deletions
diff --git a/files/de/web/api/childnode/index.html b/files/de/web/api/childnode/index.html
new file mode 100644
index 0000000000..07dcc1cb33
--- /dev/null
+++ b/files/de/web/api/childnode/index.html
@@ -0,0 +1,190 @@
+---
+title: ChildNode
+slug: Web/API/ChildNode
+tags:
+ - API
+ - DOM
+ - Experimental
+ - Interface
+ - NeedsTranslation
+ - Node
+ - TopicStub
+translation_of: Web/API/ChildNode
+---
+<div>{{APIRef("DOM")}}</div>
+
+<p>The <code><strong>ChildNode</strong></code> interface contains methods that are particular to {{domxref("Node")}} objects that can have a parent.</p>
+
+<p><code>ChildNode</code> is a raw interface and no object of this type can be created; it is implemented by {{domxref("Element")}}, {{domxref("DocumentType")}}, and {{domxref("CharacterData")}} objects.</p>
+
+<h2 id="Properties">Properties</h2>
+
+<p><em>There are neither inherited, nor specific properties.</em></p>
+
+<h2 id="Methods">Methods</h2>
+
+<p><em>There are no inherited methods.</em></p>
+
+<dl>
+ <dt>{{domxref("ChildNode.remove()")}} {{experimental_inline}}</dt>
+ <dd>Removes this <code>ChildNode</code> from the children list of its parent.</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>Replaces this <code>ChildNode</code> in the children list of its parent with a set of {{domxref("Node")}} or {{domxref("DOMString")}} objects. {{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>Split the <code>ElementTraversal</code> interface in {{domxref("ParentNode")}} and <code>ChildNode</code>. <code>previousElementSibling</code> and <code>nextElementSibling</code> are now defined on the latter. The {{domxref("CharacterData")}} and {{domxref("DocumentType")}} implemented the new interfaces. Added the <code>remove()</code>, <code>before()</code>, <code>after()</code> and <code>replaceWith()</code> methods.</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>Edge</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>{{CompatChrome(1.0)}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoDesktop(23)}}</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>{{CompatChrome(23.0)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatGeckoDesktop(23)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>16.0</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ <tr>
+ <td><code>remove()</code>{{experimental_inline}}</td>
+ <td>{{CompatChrome(29.0)}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoDesktop(23)}}</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>{{CompatChrome(54.0)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatGeckoDesktop(49)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatOpera(39)}}</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>Android Webview</th>
+ <th>Edge</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ <th>Chrome for Android</th>
+ </tr>
+ <tr>
+ <td>Basic support (on {{domxref("Element")}})</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoMobile(23)}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>10.0</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ <tr>
+ <td>Support on {{domxref("DocumentType")}} and {{domxref("CharacterData")}} {{experimental_inline}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatGeckoMobile(23)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>16.0</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ <tr>
+ <td><code>remove()</code>{{experimental_inline}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoMobile(23)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>16.0</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ <tr>
+ <td><code>before()</code>, <code>after()</code>, and <code>replaceWith()</code> {{experimental_inline}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatChrome(54.0)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatGeckoMobile(49)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatOperaMobile(39)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatChrome(54.0)}}</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>
diff --git a/files/de/web/api/childnode/remove/index.html b/files/de/web/api/childnode/remove/index.html
new file mode 100644
index 0000000000..bae33f75c0
--- /dev/null
+++ b/files/de/web/api/childnode/remove/index.html
@@ -0,0 +1,97 @@
+---
+title: ChildNode.remove()
+slug: Web/API/ChildNode/remove
+tags:
+ - API
+ - ChildNode
+ - DOM
+ - Experimentell
+ - Méthode
+translation_of: Web/API/ChildNode/remove
+---
+<div>{{APIRef("DOM")}}</div>
+
+<p>Die <code><strong>ChildNode.remove()</strong></code> Methode entfernt ein Objekt aus der Baumstruktur ("tree") zu der es gehört.</p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox"><em>node</em>.remove();
+</pre>
+
+<h2 id="Beispiel">Beispiel</h2>
+
+<h3 id="Benutzung_von_remove()">Benutzung von <code>remove()</code></h3>
+
+<pre class="brush: html">&lt;div id="div-01"&gt;Dies ist div-01&lt;/div&gt;
+&lt;div id="div-02"&gt;Dies ist div-02&lt;/div&gt;
+&lt;div id="div-03"&gt;Dies ist div-03&lt;/div&gt;
+</pre>
+
+<pre class="brush: js">var el = document.getElementById('div-02');
+el.remove(); // Entfernt das div Element mit der id 'div-02'
+</pre>
+
+<h3 id="ChildNode.remove()_kann_nicht_gescopet_werden"><code>ChildNode.remove()</code> kann nicht gescopet werden</h3>
+
+<p>Die <code>remove()</code> Methode kann nicht mit dem <code>with</code> Statement gescopet werden. {{jsxref("Symbol.unscopables")}} enthält mehr Informationen darüber.</p>
+
+<pre class="brush: js">with(node) {
+ remove();
+}
+// Erzeught einen ReferenceError</pre>
+
+<h2 id="Polyfill">Polyfill</h2>
+
+<p>Ein Polyfill der <code>remove()</code> Methode in Internet Explorer 9 und höher sieht folgendermaßen aus:</p>
+
+<pre class="brush: js">// von:https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/remove()/remove().md
+(function (arr) {
+ arr.forEach(function (item) {
+ if (item.hasOwnProperty('remove')) {
+ return;
+ }
+ Object.defineProperty(item, 'remove', {
+ configurable: true,
+ enumerable: true,
+ writable: true,
+ value: function remove() {
+ if (this.parentNode !== null)
+ this.parentNode.removeChild(this);
+ }
+ });
+ });
+})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);</pre>
+
+<h2 id="Specifikationen">Specifikationen</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specifikation</th>
+ <th scope="col">Status</th>
+ <th scope="col">Kommentar</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}</td>
+ <td>{{Spec2('DOM WHATWG')}}</td>
+ <td>Erste Definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>
+
+
+<p>{{Compat("api.ChildNode.remove")}}</p>
+</div>
+
+<h2 id="Siehe_auch">Siehe auch</h2>
+
+<ul>
+ <li>Das reine {{domxref("ChildNode")}} Interface.</li>
+ <li>
+ <div class="syntaxbox">Objekttypen die dieses Interface implementieren: {{domxref("CharacterData")}}, {{domxref("Element")}} und {{domxref("DocumentType")}}.</div>
+ </li>
+</ul>