From 156b518735b8da6cc954105b0a1250ca31449381 Mon Sep 17 00:00:00 2001 From: MDN Date: Sat, 22 May 2021 00:42:07 +0000 Subject: [CRON] sync translated content --- files/de/_redirects.txt | 1 + files/de/_wikihistory.json | 12 +-- .../orphaned/web/api/childnode/remove/index.html | 98 ++++++++++++++++++++ files/de/web/api/childnode/remove/index.html | 97 -------------------- files/es/_redirects.txt | 1 + files/es/_wikihistory.json | 18 ++-- .../orphaned/web/api/childnode/remove/index.html | 95 +++++++++++++++++++ files/es/web/api/childnode/remove/index.html | 94 ------------------- files/fr/_redirects.txt | 1 + files/fr/_wikihistory.json | 18 ++-- .../orphaned/web/api/childnode/remove/index.html | 92 +++++++++++++++++++ files/fr/web/api/childnode/remove/index.html | 91 ------------------- files/ja/_redirects.txt | 1 + files/ja/_wikihistory.json | 20 ++-- .../orphaned/web/api/childnode/remove/index.html | 97 ++++++++++++++++++++ files/ja/web/api/childnode/remove/index.html | 96 -------------------- files/ko/_redirects.txt | 1 + files/ko/_wikihistory.json | 12 +-- .../orphaned/web/api/childnode/remove/index.html | 98 ++++++++++++++++++++ files/ko/web/api/childnode/remove/index.html | 97 -------------------- files/pl/_redirects.txt | 1 + files/pl/_wikihistory.json | 18 ++-- .../orphaned/web/api/childnode/remove/index.html | 92 +++++++++++++++++++ files/pl/web/api/childnode/remove/index.html | 91 ------------------- files/pt-br/_redirects.txt | 1 + files/pt-br/_wikihistory.json | 14 +-- .../orphaned/web/api/childnode/remove/index.html | 101 +++++++++++++++++++++ files/pt-br/web/api/childnode/remove/index.html | 100 -------------------- files/ru/_redirects.txt | 1 + files/ru/_wikihistory.json | 16 ++-- .../orphaned/web/api/childnode/remove/index.html | 91 +++++++++++++++++++ files/ru/web/api/childnode/remove/index.html | 90 ------------------ files/zh-cn/_redirects.txt | 3 +- files/zh-cn/_wikihistory.json | 32 +++---- .../orphaned/web/api/childnode/remove/index.html | 96 ++++++++++++++++++++ files/zh-cn/web/api/childnode/remove/index.html | 95 ------------------- 36 files changed, 950 insertions(+), 932 deletions(-) create mode 100644 files/de/orphaned/web/api/childnode/remove/index.html delete mode 100644 files/de/web/api/childnode/remove/index.html create mode 100644 files/es/orphaned/web/api/childnode/remove/index.html delete mode 100644 files/es/web/api/childnode/remove/index.html create mode 100644 files/fr/orphaned/web/api/childnode/remove/index.html delete mode 100644 files/fr/web/api/childnode/remove/index.html create mode 100644 files/ja/orphaned/web/api/childnode/remove/index.html delete mode 100644 files/ja/web/api/childnode/remove/index.html create mode 100644 files/ko/orphaned/web/api/childnode/remove/index.html delete mode 100644 files/ko/web/api/childnode/remove/index.html create mode 100644 files/pl/orphaned/web/api/childnode/remove/index.html delete mode 100644 files/pl/web/api/childnode/remove/index.html create mode 100644 files/pt-br/orphaned/web/api/childnode/remove/index.html delete mode 100644 files/pt-br/web/api/childnode/remove/index.html create mode 100644 files/ru/orphaned/web/api/childnode/remove/index.html delete mode 100644 files/ru/web/api/childnode/remove/index.html create mode 100644 files/zh-cn/orphaned/web/api/childnode/remove/index.html delete mode 100644 files/zh-cn/web/api/childnode/remove/index.html (limited to 'files') diff --git a/files/de/_redirects.txt b/files/de/_redirects.txt index 8f8a4abfda..dd83cf2012 100644 --- a/files/de/_redirects.txt +++ b/files/de/_redirects.txt @@ -484,6 +484,7 @@ /de/docs/Verwenden_des_Cache_beim_Firefox_1.5 /de/docs/Mozilla/Firefox/Releases/1.5/Using_Firefox_1.5_caching /de/docs/Web/API/AudioContext/decodeAudioData /de/docs/Web/API/BaseAudioContext/decodeAudioData /de/docs/Web/API/CSSRule.cssText /de/docs/Web/API/CSSRule/cssText +/de/docs/Web/API/ChildNode/remove /de/docs/orphaned/Web/API/ChildNode/remove /de/docs/Web/API/Element.querySelector /de/docs/Web/API/Element/querySelector /de/docs/Web/API/File/Typ /de/docs/Web/API/File/type /de/docs/Web/API/File/Zugriff_auf_Dateien_von_Webapplikationen /de/docs/Web/API/File/Using_files_from_web_applications diff --git a/files/de/_wikihistory.json b/files/de/_wikihistory.json index 2cfc31cc6c..ee41a1874a 100644 --- a/files/de/_wikihistory.json +++ b/files/de/_wikihistory.json @@ -2764,12 +2764,6 @@ "stevenwdv" ] }, - "Web/API/ChildNode/remove": { - "modified": "2020-10-15T22:05:03.102Z", - "contributors": [ - "sv3m0r" - ] - }, "Web/API/Console": { "modified": "2020-10-15T21:47:34.377Z", "contributors": [ @@ -14747,6 +14741,12 @@ "AARADEANCA" ] }, + "orphaned/Web/API/ChildNode/remove": { + "modified": "2020-10-15T22:05:03.102Z", + "contributors": [ + "sv3m0r" + ] + }, "orphaned/Web/CSS/:-moz-ui-valid": { "modified": "2019-03-23T22:42:34.212Z", "contributors": [ diff --git a/files/de/orphaned/web/api/childnode/remove/index.html b/files/de/orphaned/web/api/childnode/remove/index.html new file mode 100644 index 0000000000..adf2c6b8da --- /dev/null +++ b/files/de/orphaned/web/api/childnode/remove/index.html @@ -0,0 +1,98 @@ +--- +title: ChildNode.remove() +slug: orphaned/Web/API/ChildNode/remove +tags: + - API + - ChildNode + - DOM + - Experimentell + - Méthode +translation_of: Web/API/ChildNode/remove +original_slug: Web/API/ChildNode/remove +--- +
{{APIRef("DOM")}}
+ +

Die ChildNode.remove() Methode entfernt ein Objekt aus der Baumstruktur ("tree") zu der es gehört.

+ +

Syntax

+ +
node.remove();
+
+ +

Beispiel

+ +

Benutzung von remove()

+ +
<div id="div-01">Dies ist div-01</div>
+<div id="div-02">Dies ist div-02</div>
+<div id="div-03">Dies ist div-03</div>
+
+ +
var el = document.getElementById('div-02');
+el.remove(); // Entfernt das div Element mit der id 'div-02'
+
+ +

ChildNode.remove() kann nicht gescopet werden

+ +

Die remove() Methode kann nicht mit dem with Statement gescopet werden. {{jsxref("Symbol.unscopables")}} enthält mehr Informationen darüber.

+ +
with(node) {
+  remove();
+}
+// Erzeught einen ReferenceError
+ +

Polyfill

+ +

Ein Polyfill der remove() Methode in Internet Explorer 9 und höher sieht folgendermaßen aus:

+ +
// 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]);
+ +

Specifikationen

+ + + + + + + + + + + + + + +
SpecifikationStatusKommentar
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}Erste Definition.
+ +

Browser compatibility

+ +
+ + +

{{Compat("api.ChildNode.remove")}}

+
+ +

Siehe auch

+ + diff --git a/files/de/web/api/childnode/remove/index.html b/files/de/web/api/childnode/remove/index.html deleted file mode 100644 index bae33f75c0..0000000000 --- a/files/de/web/api/childnode/remove/index.html +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: ChildNode.remove() -slug: Web/API/ChildNode/remove -tags: - - API - - ChildNode - - DOM - - Experimentell - - Méthode -translation_of: Web/API/ChildNode/remove ---- -
{{APIRef("DOM")}}
- -

Die ChildNode.remove() Methode entfernt ein Objekt aus der Baumstruktur ("tree") zu der es gehört.

- -

Syntax

- -
node.remove();
-
- -

Beispiel

- -

Benutzung von remove()

- -
<div id="div-01">Dies ist div-01</div>
-<div id="div-02">Dies ist div-02</div>
-<div id="div-03">Dies ist div-03</div>
-
- -
var el = document.getElementById('div-02');
-el.remove(); // Entfernt das div Element mit der id 'div-02'
-
- -

ChildNode.remove() kann nicht gescopet werden

- -

Die remove() Methode kann nicht mit dem with Statement gescopet werden. {{jsxref("Symbol.unscopables")}} enthält mehr Informationen darüber.

- -
with(node) {
-  remove();
-}
-// Erzeught einen ReferenceError
- -

Polyfill

- -

Ein Polyfill der remove() Methode in Internet Explorer 9 und höher sieht folgendermaßen aus:

- -
// 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]);
- -

Specifikationen

- - - - - - - - - - - - - - -
SpecifikationStatusKommentar
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}Erste Definition.
- -

Browser compatibility

- -
- - -

{{Compat("api.ChildNode.remove")}}

-
- -

Siehe auch

- - diff --git a/files/es/_redirects.txt b/files/es/_redirects.txt index cdbad98cc4..acb86f967d 100644 --- a/files/es/_redirects.txt +++ b/files/es/_redirects.txt @@ -1779,6 +1779,7 @@ /es/docs/Web/API/CameraCapabilities.maxExposureCompensation /es/docs/Web/API/CameraCapabilities/maxExposureCompensation /es/docs/Web/API/CameraCapabilities.maxFocusAreas /es/docs/Web/API/CameraCapabilities/maxFocusAreas /es/docs/Web/API/Canvas_API/Tutorial/Compositing/Ejemplo /es/docs/Web/API/Canvas_API/Tutorial/Compositing/Example +/es/docs/Web/API/ChildNode/remove /es/docs/orphaned/Web/API/ChildNode/remove /es/docs/Web/API/Console/tabla /es/docs/Web/API/Console/table /es/docs/Web/API/Constraint_validation/invalid_event /es/docs/Web/API/HTMLInputElement/invalid_event /es/docs/Web/API/Coordinates /es/docs/Web/API/GeolocationCoordinates diff --git a/files/es/_wikihistory.json b/files/es/_wikihistory.json index b3756077d8..933fa3d9f8 100644 --- a/files/es/_wikihistory.json +++ b/files/es/_wikihistory.json @@ -5547,15 +5547,6 @@ "SoftwareRVG" ] }, - "Web/API/ChildNode/remove": { - "modified": "2020-10-15T21:50:43.901Z", - "contributors": [ - "daniel.arango", - "teffcode", - "AlePerez92", - "SoftwareRVG" - ] - }, "Web/API/ChildNode/replaceWith": { "modified": "2019-03-23T22:23:34.633Z", "contributors": [ @@ -23485,6 +23476,15 @@ "HenryGR" ] }, + "orphaned/Web/API/ChildNode/remove": { + "modified": "2020-10-15T21:50:43.901Z", + "contributors": [ + "daniel.arango", + "teffcode", + "AlePerez92", + "SoftwareRVG" + ] + }, "orphaned/Web/API/Detecting_device_orientation": { "modified": "2020-08-11T08:30:00.189Z", "contributors": [ diff --git a/files/es/orphaned/web/api/childnode/remove/index.html b/files/es/orphaned/web/api/childnode/remove/index.html new file mode 100644 index 0000000000..069ed69160 --- /dev/null +++ b/files/es/orphaned/web/api/childnode/remove/index.html @@ -0,0 +1,95 @@ +--- +title: ChildNode.remove() +slug: orphaned/Web/API/ChildNode/remove +tags: + - API + - ChildNode + - DOM + - Experimental + - metodo +translation_of: Web/API/ChildNode/remove +original_slug: Web/API/ChildNode/remove +--- +

{{APIRef ( "DOM")}}
+ El método ChildNode.remove ( ) elimina el objeto del árbol al que pertenece.

+ +

Sintaxis

+ +
node.remove();
+
+ +

Ejemplo

+ +

Utilizando remove()

+ +
<div id="div-01">Este es el div-01</div>
+<div id="div-02">Este es el div-02</div>
+<div id="div-03">Este es el div-03</div>
+
+ +
var el = document.getElementById('div-02');
+el.nextElementSibling.remove(); // Elimina el div con el id 'div-03'
+
+ +

ChildNode.remove() es unscopable

+ +

El método remove() no está definido en el contexto de las declaración with. Consulte {{jsxref ("Symbol.unscopables")}} para obtener más información.

+ +
with(node) {
+  remove();
+}
+// ReferenceError: remove is not defined 
+ +

Polyfill

+ +

El código a continuación es un polyfill del método remove() para Internet Explorer 9 y superiores:

+ +
// from: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]);
+ +

Especificaciones

+ + + + + + + + + + + + + + +
EspecificaciónEstadoComentario
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}Definición inicial.
+ +

Compatibilidad en los navegadores

+ +
+

{{Compat("api.ChildNode.remove")}}

+
+ +

Ver también

+ + diff --git a/files/es/web/api/childnode/remove/index.html b/files/es/web/api/childnode/remove/index.html deleted file mode 100644 index 90aab3d869..0000000000 --- a/files/es/web/api/childnode/remove/index.html +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: ChildNode.remove() -slug: Web/API/ChildNode/remove -tags: - - API - - ChildNode - - DOM - - Experimental - - metodo -translation_of: Web/API/ChildNode/remove ---- -

{{APIRef ( "DOM")}}
- El método ChildNode.remove ( ) elimina el objeto del árbol al que pertenece.

- -

Sintaxis

- -
node.remove();
-
- -

Ejemplo

- -

Utilizando remove()

- -
<div id="div-01">Este es el div-01</div>
-<div id="div-02">Este es el div-02</div>
-<div id="div-03">Este es el div-03</div>
-
- -
var el = document.getElementById('div-02');
-el.nextElementSibling.remove(); // Elimina el div con el id 'div-03'
-
- -

ChildNode.remove() es unscopable

- -

El método remove() no está definido en el contexto de las declaración with. Consulte {{jsxref ("Symbol.unscopables")}} para obtener más información.

- -
with(node) {
-  remove();
-}
-// ReferenceError: remove is not defined 
- -

Polyfill

- -

El código a continuación es un polyfill del método remove() para Internet Explorer 9 y superiores:

- -
// from: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]);
- -

Especificaciones

- - - - - - - - - - - - - - -
EspecificaciónEstadoComentario
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}Definición inicial.
- -

Compatibilidad en los navegadores

- -
-

{{Compat("api.ChildNode.remove")}}

-
- -

Ver también

- - diff --git a/files/fr/_redirects.txt b/files/fr/_redirects.txt index 1e182bf7a1..f9bb4f68cc 100644 --- a/files/fr/_redirects.txt +++ b/files/fr/_redirects.txt @@ -3614,6 +3614,7 @@ /fr/docs/Web/API/Canvas_API/Tutoriel_canvas/Transformations /fr/docs/Web/API/Canvas_API/Tutorial/Transformations /fr/docs/Web/API/Canvas_API/Tutoriel_canvas/Utilisation_d'images /fr/docs/Web/API/Canvas_API/Tutorial/Using_images /fr/docs/Web/API/Canvas_API/Tutoriel_canvas/Utilisation_de_base /fr/docs/Web/API/Canvas_API/Tutorial/Basic_usage +/fr/docs/Web/API/ChildNode/remove /fr/docs/orphaned/Web/API/ChildNode/remove /fr/docs/Web/API/Commentaire /fr/docs/Web/API/Comment /fr/docs/Web/API/Commentaire/Comment /fr/docs/Web/API/Comment/Comment /fr/docs/Web/API/Console.table /fr/docs/Web/API/Console/table diff --git a/files/fr/_wikihistory.json b/files/fr/_wikihistory.json index d56cba1bcd..c87e29f02a 100644 --- a/files/fr/_wikihistory.json +++ b/files/fr/_wikihistory.json @@ -13087,15 +13087,6 @@ "loella16" ] }, - "Web/API/ChildNode/remove": { - "modified": "2020-10-15T21:49:32.341Z", - "contributors": [ - "tristantheb", - "loella16", - "Goofy", - "Copen" - ] - }, "Web/API/ChildNode/replaceWith": { "modified": "2020-10-15T21:55:03.476Z", "contributors": [ @@ -45059,6 +45050,15 @@ "wbamberg" ] }, + "orphaned/Web/API/ChildNode/remove": { + "modified": "2020-10-15T21:49:32.341Z", + "contributors": [ + "tristantheb", + "loella16", + "Goofy", + "Copen" + ] + }, "orphaned/Web/API/Detecting_device_orientation": { "modified": "2019-03-23T23:28:22.437Z", "contributors": [ diff --git a/files/fr/orphaned/web/api/childnode/remove/index.html b/files/fr/orphaned/web/api/childnode/remove/index.html new file mode 100644 index 0000000000..1faa1703bc --- /dev/null +++ b/files/fr/orphaned/web/api/childnode/remove/index.html @@ -0,0 +1,92 @@ +--- +title: ChildNode.remove() +slug: orphaned/Web/API/ChildNode/remove +tags: + - API + - DOM + - Méthodes + - Noeud Enfant +translation_of: Web/API/ChildNode/remove +original_slug: Web/API/ChildNode/remove +--- +
{{APIRef("DOM")}}
+ +

La méthode ChildNode.remove() retire l'objet de l'arbre auquel il appartient.

+ +

Syntaxe

+ +
node.remove();
+
+ +

Exemple

+ +

Utilisation de la méthode remove()

+ +
<div id="div-01">Here is div-01</div>
+<div id="div-02">Here is div-02</div>
+<div id="div-03">Here is div-03</div>
+
+ +
var el = document.getElementById('div-01');
+el.nextElementSibling.remove(); // Retire l'élément div dont l'id est 'div-02'
+ +

ChildNode.remove() est unscopable

+ +

La méthode remove() n'est pas comprise dans une instruction with. Voir {{jsxref("Symbol.unscopables")}} pour plus d'informations.

+ +
with(node) {
+  remove();
+}
+// ReferenceError: remove is not defined (remove n'est pas défini)
+ +

Prothèse d'émulation

+ +

Vous pouvez utiliser une prothèse d'émulation pour la méthode remove() dans Internet Explorer 9 et supérieur avec le code suivant :

+ +
// from: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]);
+ +

Spécifications

+ + + + + + + + + + + + + + +
SpécificationStatutCommentaire
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}Définition initiale
+ +

Compatibilité des navigateurs

+ +
{{Compat("api.ChildNode.remove")}}
+ +

Voir aussi

+ + diff --git a/files/fr/web/api/childnode/remove/index.html b/files/fr/web/api/childnode/remove/index.html deleted file mode 100644 index ad0b5ffa1c..0000000000 --- a/files/fr/web/api/childnode/remove/index.html +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: ChildNode.remove() -slug: Web/API/ChildNode/remove -tags: - - API - - DOM - - Méthodes - - Noeud Enfant -translation_of: Web/API/ChildNode/remove ---- -
{{APIRef("DOM")}}
- -

La méthode ChildNode.remove() retire l'objet de l'arbre auquel il appartient.

- -

Syntaxe

- -
node.remove();
-
- -

Exemple

- -

Utilisation de la méthode remove()

- -
<div id="div-01">Here is div-01</div>
-<div id="div-02">Here is div-02</div>
-<div id="div-03">Here is div-03</div>
-
- -
var el = document.getElementById('div-01');
-el.nextElementSibling.remove(); // Retire l'élément div dont l'id est 'div-02'
- -

ChildNode.remove() est unscopable

- -

La méthode remove() n'est pas comprise dans une instruction with. Voir {{jsxref("Symbol.unscopables")}} pour plus d'informations.

- -
with(node) {
-  remove();
-}
-// ReferenceError: remove is not defined (remove n'est pas défini)
- -

Prothèse d'émulation

- -

Vous pouvez utiliser une prothèse d'émulation pour la méthode remove() dans Internet Explorer 9 et supérieur avec le code suivant :

- -
// from: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]);
- -

Spécifications

- - - - - - - - - - - - - - -
SpécificationStatutCommentaire
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}Définition initiale
- -

Compatibilité des navigateurs

- -
{{Compat("api.ChildNode.remove")}}
- -

Voir aussi

- - diff --git a/files/ja/_redirects.txt b/files/ja/_redirects.txt index 62ba5264fa..78ba1fc82b 100644 --- a/files/ja/_redirects.txt +++ b/files/ja/_redirects.txt @@ -3723,6 +3723,7 @@ /ja/docs/Web/API/CanvasRenderingContext2D.drawFocusIfNeeded /ja/docs/Web/API/CanvasRenderingContext2D/drawFocusIfNeeded /ja/docs/Web/API/CanvasRenderingContext2D.removeHitRegion /ja/docs/Web/API/CanvasRenderingContext2D/removeHitRegion /ja/docs/Web/API/Canvas_API/Drawing_graphics_with_canvas /ja/docs/conflicting/Web/API/Canvas_API/Tutorial_3cd5468edc15a1ef1ddc0d2b17e1fa5d +/ja/docs/Web/API/ChildNode/remove /ja/docs/orphaned/Web/API/ChildNode/remove /ja/docs/Web/API/Console.error /ja/docs/Web/API/Console/error /ja/docs/Web/API/Coordinates /ja/docs/Web/API/GeolocationCoordinates /ja/docs/Web/API/DOMCursor.done /ja/docs/Web/API/DOMCursor/done diff --git a/files/ja/_wikihistory.json b/files/ja/_wikihistory.json index 71896bcfdf..86594d4fce 100644 --- a/files/ja/_wikihistory.json +++ b/files/ja/_wikihistory.json @@ -11643,16 +11643,6 @@ "Shirasu" ] }, - "Web/API/ChildNode/remove": { - "modified": "2020-10-15T21:51:39.796Z", - "contributors": [ - "Potappo", - "kenji-yamasaki", - "mfuji09", - "isdh", - "chikoski" - ] - }, "Web/API/ChildNode/replaceWith": { "modified": "2020-10-17T04:41:48.425Z", "contributors": [ @@ -52383,6 +52373,16 @@ "maruhiro" ] }, + "orphaned/Web/API/ChildNode/remove": { + "modified": "2020-10-15T21:51:39.796Z", + "contributors": [ + "Potappo", + "kenji-yamasaki", + "mfuji09", + "isdh", + "chikoski" + ] + }, "orphaned/Web/API/Detecting_device_orientation": { "modified": "2020-10-15T21:21:30.973Z", "contributors": [ diff --git a/files/ja/orphaned/web/api/childnode/remove/index.html b/files/ja/orphaned/web/api/childnode/remove/index.html new file mode 100644 index 0000000000..07288eb537 --- /dev/null +++ b/files/ja/orphaned/web/api/childnode/remove/index.html @@ -0,0 +1,97 @@ +--- +title: ChildNode.remove() +slug: orphaned/Web/API/ChildNode/remove +tags: + - API + - ChildNode + - DOM + - Experimental + - Method +translation_of: Web/API/ChildNode/remove +original_slug: Web/API/ChildNode/remove +--- +
{{APIRef("DOM")}}
+ +

ChildNode.remove() は所属するツリーからオブジェクトを削除します。

+ +

構文

+ +
node.remove();
+
+ +

+ +

remove() の使用

+ +
<div id="div-01">Here is div-01</div>
+<div id="div-02">Here is div-02</div>
+<div id="div-03">Here is div-03</div>
+
+ +
var el = document.getElementById('div-02');
+el.remove(); // 'div-02' の id を持った div を削除
+
+ +

ChildNode.remove() はスコーピングに非対応

+ +

remove() メソッドは with 文でのスコーピングに対応していません。 詳細は {{jsxref("Symbol.unscopables")}} をご覧ください。

+ +
with(node) {
+  remove();
+}
+// ReferenceError: remove is not defined 
+ +

ポリフィル

+ +

以下のポリフィルで、Internet Explorer 9 以降でも remove() メソッドが利用できます。

+ +
// from: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() {
+        this.parentNode.removeChild(this);
+      }
+    });
+  });
+})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}初回定義
+ +

ブラウザーの対応

+ + + +

{{Compat("api.ChildNode.remove")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/childnode/remove/index.html b/files/ja/web/api/childnode/remove/index.html deleted file mode 100644 index 82170c1da0..0000000000 --- a/files/ja/web/api/childnode/remove/index.html +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: ChildNode.remove() -slug: Web/API/ChildNode/remove -tags: - - API - - ChildNode - - DOM - - Experimental - - Method -translation_of: Web/API/ChildNode/remove ---- -
{{APIRef("DOM")}}
- -

ChildNode.remove() は所属するツリーからオブジェクトを削除します。

- -

構文

- -
node.remove();
-
- -

- -

remove() の使用

- -
<div id="div-01">Here is div-01</div>
-<div id="div-02">Here is div-02</div>
-<div id="div-03">Here is div-03</div>
-
- -
var el = document.getElementById('div-02');
-el.remove(); // 'div-02' の id を持った div を削除
-
- -

ChildNode.remove() はスコーピングに非対応

- -

remove() メソッドは with 文でのスコーピングに対応していません。 詳細は {{jsxref("Symbol.unscopables")}} をご覧ください。

- -
with(node) {
-  remove();
-}
-// ReferenceError: remove is not defined 
- -

ポリフィル

- -

以下のポリフィルで、Internet Explorer 9 以降でも remove() メソッドが利用できます。

- -
// from: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() {
-        this.parentNode.removeChild(this);
-      }
-    });
-  });
-})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
- -

仕様書

- - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}初回定義
- -

ブラウザーの対応

- - - -

{{Compat("api.ChildNode.remove")}}

- -

関連情報

- - diff --git a/files/ko/_redirects.txt b/files/ko/_redirects.txt index 8912a38333..497bfa0434 100644 --- a/files/ko/_redirects.txt +++ b/files/ko/_redirects.txt @@ -595,6 +595,7 @@ /ko/docs/Using_the_Mozilla_JavaScript_interface_to_XSL_Transformations /ko/docs/Web/XSLT/Using_the_Mozilla_JavaScript_interface_to_XSL_Transformations /ko/docs/Web/API/Boolean /ko/docs/Web/JavaScript/Reference/Global_Objects/Boolean /ko/docs/Web/API/Canvas_API/캔버스_튜토리얼 /ko/docs/Web/API/Canvas_API/Tutorial +/ko/docs/Web/API/ChildNode/remove /ko/docs/orphaned/Web/API/ChildNode/remove /ko/docs/Web/API/Detecting_device_orientation /ko/docs/orphaned/Web/API/Detecting_device_orientation /ko/docs/Web/API/Document/defaultView/popstate_event /ko/docs/Web/API/Window/popstate_event /ko/docs/Web/API/Document/defaultView/resize_event /ko/docs/Web/API/Window/resize_event diff --git a/files/ko/_wikihistory.json b/files/ko/_wikihistory.json index 519e9ba4e4..bd986bb2c3 100644 --- a/files/ko/_wikihistory.json +++ b/files/ko/_wikihistory.json @@ -3829,12 +3829,6 @@ "cs09g" ] }, - "Web/API/ChildNode/remove": { - "modified": "2020-10-15T22:10:05.225Z", - "contributors": [ - "cs09g" - ] - }, "Web/API/Clients": { "modified": "2020-10-15T22:21:49.146Z" }, @@ -18393,6 +18387,12 @@ "cap3618" ] }, + "orphaned/Web/API/ChildNode/remove": { + "modified": "2020-10-15T22:10:05.225Z", + "contributors": [ + "cs09g" + ] + }, "orphaned/Web/API/Detecting_device_orientation": { "modified": "2019-03-23T23:27:06.270Z", "contributors": [ diff --git a/files/ko/orphaned/web/api/childnode/remove/index.html b/files/ko/orphaned/web/api/childnode/remove/index.html new file mode 100644 index 0000000000..2b22e4aaaa --- /dev/null +++ b/files/ko/orphaned/web/api/childnode/remove/index.html @@ -0,0 +1,98 @@ +--- +title: ChildNode.remove() +slug: orphaned/Web/API/ChildNode/remove +tags: + - API + - ChildNode + - DOM + - 메소드 + - 실험중 +translation_of: Web/API/ChildNode/remove +original_slug: Web/API/ChildNode/remove +--- +
{{APIRef("DOM")}}
+ +

ChildNode.remove() 메소드는 이를 포함하는 트리로부터 객체를 제거합니다.

+ +

문법

+ +
node.remove();
+
+ +

예제

+ +

remove() 사용하기

+ +
<div id="div-01">div-01 입니다</div>
+<div id="div-02">div-02 입니다</div>
+<div id="div-03">div-03 입니다</div>
+
+ +
var el = document.getElementById('div-02');
+el.remove(); // id가 'div-02' 인 div를 제거합니다
+
+ +

ChildNode.remove() 는 스코프 지정 불가

+ +

remove() 메소드는 with 구문으로 스코프를 지정할 수 없습니다. 자세한 내용은 {{jsxref("Symbol.unscopables")}} 을 확인하세요.

+ +
with(node) {
+  remove();
+}
+// ReferenceError: remove is not defined 
+ +

폴리필

+ +

인터넷 익스플로러 9 이상에서는 다음 코드를 사용해 remove() 메소드 를 폴리필링할 수 있습니다.

+ +
// from: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]);
+ +

명세

+ + + + + + + + + + + + + + +
명세상태코멘트
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}초기 정의.
+ +

브라우저 호환성

+ +
+ + +

{{Compat("api.ChildNode.remove")}}

+
+ +

함께 보기

+ + diff --git a/files/ko/web/api/childnode/remove/index.html b/files/ko/web/api/childnode/remove/index.html deleted file mode 100644 index 2c4992989f..0000000000 --- a/files/ko/web/api/childnode/remove/index.html +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: ChildNode.remove() -slug: Web/API/ChildNode/remove -tags: - - API - - ChildNode - - DOM - - 메소드 - - 실험중 -translation_of: Web/API/ChildNode/remove ---- -
{{APIRef("DOM")}}
- -

ChildNode.remove() 메소드는 이를 포함하는 트리로부터 객체를 제거합니다.

- -

문법

- -
node.remove();
-
- -

예제

- -

remove() 사용하기

- -
<div id="div-01">div-01 입니다</div>
-<div id="div-02">div-02 입니다</div>
-<div id="div-03">div-03 입니다</div>
-
- -
var el = document.getElementById('div-02');
-el.remove(); // id가 'div-02' 인 div를 제거합니다
-
- -

ChildNode.remove() 는 스코프 지정 불가

- -

remove() 메소드는 with 구문으로 스코프를 지정할 수 없습니다. 자세한 내용은 {{jsxref("Symbol.unscopables")}} 을 확인하세요.

- -
with(node) {
-  remove();
-}
-// ReferenceError: remove is not defined 
- -

폴리필

- -

인터넷 익스플로러 9 이상에서는 다음 코드를 사용해 remove() 메소드 를 폴리필링할 수 있습니다.

- -
// from: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]);
- -

명세

- - - - - - - - - - - - - - -
명세상태코멘트
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}초기 정의.
- -

브라우저 호환성

- -
- - -

{{Compat("api.ChildNode.remove")}}

-
- -

함께 보기

- - diff --git a/files/pl/_redirects.txt b/files/pl/_redirects.txt index b3ad81c075..660f48d5c3 100644 --- a/files/pl/_redirects.txt +++ b/files/pl/_redirects.txt @@ -1930,6 +1930,7 @@ /pl/docs/Web/API/AudioContext/createDynamicsCompressor /pl/docs/Web/API/BaseAudioContext/createDynamicsCompressor /pl/docs/Web/API/Canvas_API/Tutorial/Optymalizacja_canvas /pl/docs/Web/API/Canvas_API/Tutorial/Optimizing_canvas /pl/docs/Web/API/Canvas_API/Tutorial/rysowanie_ksztaltow /pl/docs/Web/API/Canvas_API/Tutorial/Drawing_shapes +/pl/docs/Web/API/ChildNode/remove /pl/docs/orphaned/Web/API/ChildNode/remove /pl/docs/Web/API/Document/firstChild /pl/docs/conflicting/Web/API/Node/firstChild /pl/docs/Web/API/Document/namespaceURI /pl/docs/conflicting/Web/API/Node/namespaceURI /pl/docs/Web/API/DocumentOrShadowRoot/activeElement /pl/docs/Web/API/Document/activeElement diff --git a/files/pl/_wikihistory.json b/files/pl/_wikihistory.json index 10f5a85317..9eb38ac6da 100644 --- a/files/pl/_wikihistory.json +++ b/files/pl/_wikihistory.json @@ -1564,15 +1564,6 @@ "arronei" ] }, - "Web/API/ChildNode/remove": { - "modified": "2020-10-15T21:53:18.455Z", - "contributors": [ - "SphinxKnight", - "Fidosek", - "griter", - "krystian71115" - ] - }, "Web/API/Console": { "modified": "2019-03-23T23:09:41.834Z", "contributors": [ @@ -11239,6 +11230,15 @@ "Ptak82" ] }, + "orphaned/Web/API/ChildNode/remove": { + "modified": "2020-10-15T21:53:18.455Z", + "contributors": [ + "SphinxKnight", + "Fidosek", + "griter", + "krystian71115" + ] + }, "orphaned/Web/API/ParentNode": { "modified": "2020-10-15T22:19:13.921Z" }, diff --git a/files/pl/orphaned/web/api/childnode/remove/index.html b/files/pl/orphaned/web/api/childnode/remove/index.html new file mode 100644 index 0000000000..6b77c445b2 --- /dev/null +++ b/files/pl/orphaned/web/api/childnode/remove/index.html @@ -0,0 +1,92 @@ +--- +title: ChildNode.remove() +slug: orphaned/Web/API/ChildNode/remove +translation_of: Web/API/ChildNode/remove +original_slug: Web/API/ChildNode/remove +--- +
{{APIRef("DOM")}}
+ +

Metoda ChildNode.remove() usuwa obiekt z drzewa, do którego należy.

+ +

Składnia

+ +
node.remove();
+
+ +

Przykład

+ +

Użycie remove()

+ +
<div id="div-01">To jest div-01</div>
+<div id="div-02">To jest div-02</div>
+<div id="div-03">To jest div-03</div>
+
+ +
var el = document.getElementById('div-02');
+el.remove(); // Usuwa div z ID 'div-02'
+
+ +

ChildNode.remove() jest poza zakresem

+ +

Metoda remove() nie wchodzi w zakres wyrażenia with. Zobacz  {{jsxref("Symbol.unscopables")}}, aby uzyskać więcej informacji.

+ +
with(node) {
+  remove();
+}
+// ReferenceError: remove is not defined 
+ +

Polyfill

+ +

Można utworzyć polyfill metody remove() w Internet Explorer 9 (lub wyższej wersji) za pomocą następującego kodu: 

+ +
// from: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() {
+        this.parentNode.removeChild(this);
+      }
+    });
+  });
+})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
+ +

Specyfikacje

+ + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}Initial definition.
{{SpecName('DOM4', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM4')}} 
+ +

Kompatybilność z przeglądarkami

+ +
{{Compat("api.ChildNode.remove")}}
+ +

Zobacz również

+ + diff --git a/files/pl/web/api/childnode/remove/index.html b/files/pl/web/api/childnode/remove/index.html deleted file mode 100644 index 377e529db2..0000000000 --- a/files/pl/web/api/childnode/remove/index.html +++ /dev/null @@ -1,91 +0,0 @@ ---- -title: ChildNode.remove() -slug: Web/API/ChildNode/remove -translation_of: Web/API/ChildNode/remove ---- -
{{APIRef("DOM")}}
- -

Metoda ChildNode.remove() usuwa obiekt z drzewa, do którego należy.

- -

Składnia

- -
node.remove();
-
- -

Przykład

- -

Użycie remove()

- -
<div id="div-01">To jest div-01</div>
-<div id="div-02">To jest div-02</div>
-<div id="div-03">To jest div-03</div>
-
- -
var el = document.getElementById('div-02');
-el.remove(); // Usuwa div z ID 'div-02'
-
- -

ChildNode.remove() jest poza zakresem

- -

Metoda remove() nie wchodzi w zakres wyrażenia with. Zobacz  {{jsxref("Symbol.unscopables")}}, aby uzyskać więcej informacji.

- -
with(node) {
-  remove();
-}
-// ReferenceError: remove is not defined 
- -

Polyfill

- -

Można utworzyć polyfill metody remove() w Internet Explorer 9 (lub wyższej wersji) za pomocą następującego kodu: 

- -
// from: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() {
-        this.parentNode.removeChild(this);
-      }
-    });
-  });
-})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
- -

Specyfikacje

- - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}Initial definition.
{{SpecName('DOM4', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM4')}} 
- -

Kompatybilność z przeglądarkami

- -
{{Compat("api.ChildNode.remove")}}
- -

Zobacz również

- - diff --git a/files/pt-br/_redirects.txt b/files/pt-br/_redirects.txt index 4c036c3924..0e3cfb0cc1 100644 --- a/files/pt-br/_redirects.txt +++ b/files/pt-br/_redirects.txt @@ -538,6 +538,7 @@ /pt-BR/docs/Web/API/BatteryManager.ondischargingtimechange /pt-BR/docs/Web/API/BatteryManager/ondischargingtimechange /pt-BR/docs/Web/API/BatteryManager.onlevelchange /pt-BR/docs/Web/API/BatteryManager/onlevelchange /pt-BR/docs/Web/API/BatteryManager/ondischargintimechange /pt-BR/docs/Web/API/BatteryManager/ondischargingtimechange +/pt-BR/docs/Web/API/ChildNode/remove /pt-BR/docs/orphaned/Web/API/ChildNode/remove /pt-BR/docs/Web/API/Console.timeEnd /pt-BR/docs/Web/API/Console/timeEnd /pt-BR/docs/Web/API/Coordinates /pt-BR/docs/Web/API/GeolocationCoordinates /pt-BR/docs/Web/API/Coordinates/altitude /pt-BR/docs/Web/API/GeolocationCoordinates/altitude diff --git a/files/pt-br/_wikihistory.json b/files/pt-br/_wikihistory.json index c175f3c7b0..26d0f8c313 100644 --- a/files/pt-br/_wikihistory.json +++ b/files/pt-br/_wikihistory.json @@ -4115,13 +4115,6 @@ "pedroguilhermelima" ] }, - "Web/API/ChildNode/remove": { - "modified": "2020-10-15T21:55:19.824Z", - "contributors": [ - "SphinxKnight", - "gutoribeiro" - ] - }, "Web/API/ClipboardEvent": { "modified": "2020-10-15T22:15:35.028Z", "contributors": [ @@ -17199,6 +17192,13 @@ "mak213k" ] }, + "orphaned/Web/API/ChildNode/remove": { + "modified": "2020-10-15T21:55:19.824Z", + "contributors": [ + "SphinxKnight", + "gutoribeiro" + ] + }, "orphaned/Web/API/Document_Object_Model/Events": { "modified": "2020-08-30T22:44:17.906Z", "contributors": [ diff --git a/files/pt-br/orphaned/web/api/childnode/remove/index.html b/files/pt-br/orphaned/web/api/childnode/remove/index.html new file mode 100644 index 0000000000..57dcc06698 --- /dev/null +++ b/files/pt-br/orphaned/web/api/childnode/remove/index.html @@ -0,0 +1,101 @@ +--- +title: ChildNode.remove() +slug: orphaned/Web/API/ChildNode/remove +tags: + - API + - ChildNode + - DOM + - Experimental + - Método(2) + - remove +translation_of: Web/API/ChildNode/remove +original_slug: Web/API/ChildNode/remove +--- +
{{APIRef("DOM")}}
+ +

O método ChildNode.remove() remove o objeto da árvore a que ele pertence.

+ +

Sintase

+ +
elementNodeReference.remove();
+
+ +

Exemplo

+ +

Usando remove()

+ +
<div id="div-01">Here is div-01</div>
+<div id="div-02">Here is div-02</div>
+<div id="div-03">Here is div-03</div>
+
+ +
var el = document.getElementById('div-01');
+el.nextElementSibling.remove(); // Remove o div com o id 'div-02'
+
+ +

ChildNode.remove() não tem escopo

+ +

O método remove() não tem escopo na função with. Veja {{jsxref("Symbol.unscopables")}} para mais informação.

+ +
with(node) {
+  remove();
+}
+// ReferenceError: remove is not defined 
+ +

Polyfill

+ +

Você pode evitar incompatibilidade ao usar o método remove() no Internet Explorer 9 em diante com o seguinte código:

+ +
// de: 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() {
+        this.parentNode.removeChild(this);
+      }
+    });
+  });
+})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
+ +

Especificações

+ + + + + + + + + + + + + + + + + + + +
EspecificaçãoSituaçãoComentário
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}Definição Inicial.
{{SpecName('DOM4', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM4')}} 
+ +

Compatibilidade de navegadores

+ +
{{Compat("api.ChildNode.remove")}}
+ +

 

+ +

Veja também

+ + diff --git a/files/pt-br/web/api/childnode/remove/index.html b/files/pt-br/web/api/childnode/remove/index.html deleted file mode 100644 index 98fba11b93..0000000000 --- a/files/pt-br/web/api/childnode/remove/index.html +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: ChildNode.remove() -slug: Web/API/ChildNode/remove -tags: - - API - - ChildNode - - DOM - - Experimental - - Método(2) - - remove -translation_of: Web/API/ChildNode/remove ---- -
{{APIRef("DOM")}}
- -

O método ChildNode.remove() remove o objeto da árvore a que ele pertence.

- -

Sintase

- -
elementNodeReference.remove();
-
- -

Exemplo

- -

Usando remove()

- -
<div id="div-01">Here is div-01</div>
-<div id="div-02">Here is div-02</div>
-<div id="div-03">Here is div-03</div>
-
- -
var el = document.getElementById('div-01');
-el.nextElementSibling.remove(); // Remove o div com o id 'div-02'
-
- -

ChildNode.remove() não tem escopo

- -

O método remove() não tem escopo na função with. Veja {{jsxref("Symbol.unscopables")}} para mais informação.

- -
with(node) {
-  remove();
-}
-// ReferenceError: remove is not defined 
- -

Polyfill

- -

Você pode evitar incompatibilidade ao usar o método remove() no Internet Explorer 9 em diante com o seguinte código:

- -
// de: 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() {
-        this.parentNode.removeChild(this);
-      }
-    });
-  });
-})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
- -

Especificações

- - - - - - - - - - - - - - - - - - - -
EspecificaçãoSituaçãoComentário
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}Definição Inicial.
{{SpecName('DOM4', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM4')}} 
- -

Compatibilidade de navegadores

- -
{{Compat("api.ChildNode.remove")}}
- -

 

- -

Veja também

- - diff --git a/files/ru/_redirects.txt b/files/ru/_redirects.txt index 41b95be137..9daf59d904 100644 --- a/files/ru/_redirects.txt +++ b/files/ru/_redirects.txt @@ -383,6 +383,7 @@ /ru/docs/Web/API/Canvas_API/Tutorial/Рисование_текста /ru/docs/Web/API/Canvas_API/Tutorial/Drawing_text /ru/docs/Web/API/Canvas_API/Tutorial/Рисование_фигур /ru/docs/Web/API/Canvas_API/Tutorial/Drawing_shapes /ru/docs/Web/API/Canvas_API/Рисование_графики_с_помощью_Canvas /ru/docs/Web/API/Canvas_API/Tutorial +/ru/docs/Web/API/ChildNode/remove /ru/docs/orphaned/Web/API/ChildNode/remove /ru/docs/Web/API/Coordinates /ru/docs/Web/API/GeolocationCoordinates /ru/docs/Web/API/Document.querySelectorAll /ru/docs/Web/API/Document/querySelectorAll /ru/docs/Web/API/Document/async /ru/docs/Web/API/XMLDocument/async diff --git a/files/ru/_wikihistory.json b/files/ru/_wikihistory.json index e39169b70b..ef0f33b748 100644 --- a/files/ru/_wikihistory.json +++ b/files/ru/_wikihistory.json @@ -6485,14 +6485,6 @@ "pantherCZ" ] }, - "Web/API/ChildNode/remove": { - "modified": "2019-03-23T22:51:25.031Z", - "contributors": [ - "neoxaker", - "NikitaCoder", - "In4in" - ] - }, "Web/API/ChildNode/replaceWith": { "modified": "2020-12-02T15:53:32.691Z", "contributors": [ @@ -25573,6 +25565,14 @@ "Aleksej" ] }, + "orphaned/Web/API/ChildNode/remove": { + "modified": "2019-03-23T22:51:25.031Z", + "contributors": [ + "neoxaker", + "NikitaCoder", + "In4in" + ] + }, "orphaned/Web/API/Document_Object_Model/Events": { "modified": "2019-03-18T21:18:44.250Z", "contributors": [ diff --git a/files/ru/orphaned/web/api/childnode/remove/index.html b/files/ru/orphaned/web/api/childnode/remove/index.html new file mode 100644 index 0000000000..2f39c5641a --- /dev/null +++ b/files/ru/orphaned/web/api/childnode/remove/index.html @@ -0,0 +1,91 @@ +--- +title: Node.remove() +slug: orphaned/Web/API/ChildNode/remove +translation_of: Web/API/ChildNode/remove +original_slug: Web/API/ChildNode/remove +--- +

Метод Node.remove() удаляет узел из дерева DOM

+ +

 

+ +

То, что элемент удалён из DOM, ещё не значит, что он удалён совсем! 

+ +

Он остался объектом и исчезнет только тогда, когда исчезнут все ссылки на него.

+ +

 

+ +

Синтаксис

+ +
Node.remove();
+
+ + + +

Пример

+ +

Использование remove()

+ +
<div id="box">
+   <div id="one"></div>
+   <div id="two"></div>
+</div>
+ +
var elem = document.querySelector("#one");
+elem.remove();
+alert(document.querySelector("#box").innerHTML); //Исчез блок #one
+alert(elem); //Но как видите, сам объект ещё жив
+ +

Полифил

+ +

Можно создать полифил для IE 9 и выше, используя следующий код:

+ +
(function() {
+  var arr = [window.Element, window.CharacterData, window.DocumentType];
+  var args = [];
+
+  arr.forEach(function (item) {
+    if (item) {
+      args.push(item.prototype);
+    }
+  });
+
+  // from: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() {
+          this.parentNode.removeChild(this);
+        }
+      });
+    });
+  })(args);
+})();
+ +

Спецификация

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}Initial definition.
+ +

Поддержка браузерами

+ +

{{Compat("api.ChildNode.remove")}}

diff --git a/files/ru/web/api/childnode/remove/index.html b/files/ru/web/api/childnode/remove/index.html deleted file mode 100644 index d0e06278ae..0000000000 --- a/files/ru/web/api/childnode/remove/index.html +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Node.remove() -slug: Web/API/ChildNode/remove -translation_of: Web/API/ChildNode/remove ---- -

Метод Node.remove() удаляет узел из дерева DOM

- -

 

- -

То, что элемент удалён из DOM, ещё не значит, что он удалён совсем! 

- -

Он остался объектом и исчезнет только тогда, когда исчезнут все ссылки на него.

- -

 

- -

Синтаксис

- -
Node.remove();
-
- - - -

Пример

- -

Использование remove()

- -
<div id="box">
-   <div id="one"></div>
-   <div id="two"></div>
-</div>
- -
var elem = document.querySelector("#one");
-elem.remove();
-alert(document.querySelector("#box").innerHTML); //Исчез блок #one
-alert(elem); //Но как видите, сам объект ещё жив
- -

Полифил

- -

Можно создать полифил для IE 9 и выше, используя следующий код:

- -
(function() {
-  var arr = [window.Element, window.CharacterData, window.DocumentType];
-  var args = [];
-
-  arr.forEach(function (item) {
-    if (item) {
-      args.push(item.prototype);
-    }
-  });
-
-  // from: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() {
-          this.parentNode.removeChild(this);
-        }
-      });
-    });
-  })(args);
-})();
- -

Спецификация

- - - - - - - - - - - - - - -
СпецификацияСтатусКомментарий
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}Initial definition.
- -

Поддержка браузерами

- -

{{Compat("api.ChildNode.remove")}}

diff --git a/files/zh-cn/_redirects.txt b/files/zh-cn/_redirects.txt index eed8cfb8af..b928226809 100644 --- a/files/zh-cn/_redirects.txt +++ b/files/zh-cn/_redirects.txt @@ -1466,7 +1466,8 @@ /zh-CN/docs/Web/API/Canvas_API/Drawing_graphics_with_canvas /zh-CN/docs/conflicting/Web/API/Canvas_API/Tutorial /zh-CN/docs/Web/API/Channel_Messaging_API/使用_channel_messaging /zh-CN/docs/Web/API/Channel_Messaging_API/Using_channel_messaging /zh-CN/docs/Web/API/ChildNode.nextElementSibling /zh-CN/docs/Web/API/Element/nextElementSibling -/zh-CN/docs/Web/API/ChildNode.remove /zh-CN/docs/Web/API/ChildNode/remove +/zh-CN/docs/Web/API/ChildNode.remove /zh-CN/docs/orphaned/Web/API/ChildNode/remove +/zh-CN/docs/Web/API/ChildNode/remove /zh-CN/docs/orphaned/Web/API/ChildNode/remove /zh-CN/docs/Web/API/Childnode.previousElementSibling /zh-CN/docs/Web/API/Element/previousElementSibling /zh-CN/docs/Web/API/Coordinates /zh-CN/docs/Web/API/GeolocationCoordinates /zh-CN/docs/Web/API/Coordinates/latitude /zh-CN/docs/Web/API/GeolocationCoordinates/latitude diff --git a/files/zh-cn/_wikihistory.json b/files/zh-cn/_wikihistory.json index c3c80898d8..62e56751c9 100644 --- a/files/zh-cn/_wikihistory.json +++ b/files/zh-cn/_wikihistory.json @@ -9761,22 +9761,6 @@ "caoweiju" ] }, - "Web/API/ChildNode/remove": { - "modified": "2020-10-15T21:27:27.352Z", - "contributors": [ - "RainSlide", - "iSmartSV", - "duola8789", - "pasturn", - "Ende93", - "xgqfrms-GitHub", - "ceverytime", - "teoli", - "khalid32", - "ziyunfei", - "Darrel.Hsu" - ] - }, "Web/API/ChildNode/replaceWith": { "modified": "2020-10-15T21:56:06.625Z", "contributors": [ @@ -50277,6 +50261,22 @@ "smilewalker" ] }, + "orphaned/Web/API/ChildNode/remove": { + "modified": "2020-10-15T21:27:27.352Z", + "contributors": [ + "RainSlide", + "iSmartSV", + "duola8789", + "pasturn", + "Ende93", + "xgqfrms-GitHub", + "ceverytime", + "teoli", + "khalid32", + "ziyunfei", + "Darrel.Hsu" + ] + }, "orphaned/Web/API/Detecting_device_orientation": { "modified": "2020-10-15T21:21:28.912Z", "contributors": [ diff --git a/files/zh-cn/orphaned/web/api/childnode/remove/index.html b/files/zh-cn/orphaned/web/api/childnode/remove/index.html new file mode 100644 index 0000000000..b60cab7a0c --- /dev/null +++ b/files/zh-cn/orphaned/web/api/childnode/remove/index.html @@ -0,0 +1,96 @@ +--- +title: ChildNode.remove() +slug: orphaned/Web/API/ChildNode/remove +tags: + - API + - ChildNode + - DOM + - Method +translation_of: Web/API/ChildNode/remove +original_slug: Web/API/ChildNode/remove +--- +

{{APIRef("DOM")}}

+ +

ChildNode.remove() 方法,把对象从它所属的 DOM 树中删除。

+ +

语法

+ +
node.remove();
+ +

示例

+ +

使用 remove()

+ +
<div id="div-01">Here is div-01</div>
+<div id="div-02">Here is div-02</div>
+<div id="div-03">Here is div-03</div>
+
+ +
var el = document.getElementById('div-02');
+el.remove();
+// id 为 'div-02' 的 div 被删掉了
+
+ +

{{EmbedLiveSample('使用_remove()')}}

+ +

ChildNode.remove() 是不可见的

+ +

with 语句中,remove() 方法是不可见的。参阅 {{jsxref("Symbol.unscopables")}} 了解更多信息。

+ +
with(node) {
+  remove();
+}
+// ReferenceError: remove is not defined
+ +

Polyfill

+ +

You can polyfill the remove() method in Internet Explorer 9 and higher with the following code:

+ +
//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() {
+        this.parentNode.removeChild(this);
+      }
+    });
+  });
+})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
+ +

规范

+ + + + + + + + + + + + + + +
规范状态注释
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}Initial definition.
+ +

浏览器兼容性

+ + + +

{{Compat("api.ChildNode.remove")}}

+ +

参见

+ + diff --git a/files/zh-cn/web/api/childnode/remove/index.html b/files/zh-cn/web/api/childnode/remove/index.html deleted file mode 100644 index 001975cd60..0000000000 --- a/files/zh-cn/web/api/childnode/remove/index.html +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: ChildNode.remove() -slug: Web/API/ChildNode/remove -tags: - - API - - ChildNode - - DOM - - Method -translation_of: Web/API/ChildNode/remove ---- -

{{APIRef("DOM")}}

- -

ChildNode.remove() 方法,把对象从它所属的 DOM 树中删除。

- -

语法

- -
node.remove();
- -

示例

- -

使用 remove()

- -
<div id="div-01">Here is div-01</div>
-<div id="div-02">Here is div-02</div>
-<div id="div-03">Here is div-03</div>
-
- -
var el = document.getElementById('div-02');
-el.remove();
-// id 为 'div-02' 的 div 被删掉了
-
- -

{{EmbedLiveSample('使用_remove()')}}

- -

ChildNode.remove() 是不可见的

- -

with 语句中,remove() 方法是不可见的。参阅 {{jsxref("Symbol.unscopables")}} 了解更多信息。

- -
with(node) {
-  remove();
-}
-// ReferenceError: remove is not defined
- -

Polyfill

- -

You can polyfill the remove() method in Internet Explorer 9 and higher with the following code:

- -
//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() {
-        this.parentNode.removeChild(this);
-      }
-    });
-  });
-})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
- -

规范

- - - - - - - - - - - - - - -
规范状态注释
{{SpecName('DOM WHATWG', '#dom-childnode-remove', 'ChildNode.remove')}}{{Spec2('DOM WHATWG')}}Initial definition.
- -

浏览器兼容性

- - - -

{{Compat("api.ChildNode.remove")}}

- -

参见

- - -- cgit v1.2.3-54-g00ecf