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/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 -------------------- 4 files changed, 109 insertions(+), 107 deletions(-) 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 (limited to 'files/pt-br') 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

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