From 7053a316d36dc8193eb102d0cba46f4970a05637 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Sun, 11 Jul 2021 09:25:19 -0400 Subject: delete conflicting/orphaned in pt-BR (#1421) * delete conflicting/orphaned in pt-BR * chore: remove empty line * deleted last orphaned redirects * remove deleted orphans Co-authored-by: Josiel Rocha <1158643+josielrocha@users.noreply.github.com> Co-authored-by: Josiel Rocha --- .../orphaned/web/api/childnode/after/index.html | 186 --------------------- files/pt-br/orphaned/web/api/childnode/index.html | 79 --------- .../orphaned/web/api/childnode/remove/index.html | 101 ----------- 3 files changed, 366 deletions(-) delete mode 100644 files/pt-br/orphaned/web/api/childnode/after/index.html delete mode 100644 files/pt-br/orphaned/web/api/childnode/index.html delete mode 100644 files/pt-br/orphaned/web/api/childnode/remove/index.html (limited to 'files/pt-br/orphaned/web/api/childnode') diff --git a/files/pt-br/orphaned/web/api/childnode/after/index.html b/files/pt-br/orphaned/web/api/childnode/after/index.html deleted file mode 100644 index 8fa84d11ee..0000000000 --- a/files/pt-br/orphaned/web/api/childnode/after/index.html +++ /dev/null @@ -1,186 +0,0 @@ ---- -title: ChildNode.after() -slug: orphaned/Web/API/ChildNode/after -tags: - - API - - DOM - - Experimental - - Nó - - Referencia - - metodo -translation_of: Web/API/ChildNode/after -original_slug: Web/API/ChildNode/after ---- -
{{APIRef("DOM")}} {{SeeCompatTable}}
- -

The ChildNode.after() method inserts a set of {{domxref("Node")}} or {{domxref("DOMString")}} objects in the children list of this ChildNode's parent, just after this ChildNode. {{domxref("DOMString")}} objects are inserted as equivalent {{domxref("Text")}} nodes.

- -

Sintaxe

- -
[Throws, Unscopable]
-void ChildNode.after((Node or DOMString)... nodes);
-
- -

Parâmetros

- -
-
nós
-
A set of {{domxref("Node")}} or {{domxref("DOMString")}} objects to insert.
-
- -

Exceções

- - - -

Exemplos

- -

Inserindo uum elemento

- -
var parente = document.createElement("div");
-var filho = document.createElement("p");
-parente.appendChild(filho);
-var span = document.createElement("span");
-
-filho.after(span);
-
-console.log(parente.outerHTML);
-// "<div><p></p><span></span></div>"
-
- -

Inserindo texto

- -
var parente = document.createElement("div");
-var filho = document.createElement("p");
-parente.appendChild(filho);
-
-filho.after("Text");
-
-console.log(parente.outerHTML);
-// "<div><p></p>Text</div>"
- -

Inserindo um elemento e um texto 

- -
var parente = document.createElement("div");
-var filho = document.createElement("p");
-parente.appendChild(filho);
-var span = document.createElement("span");
-
-filho.after(span, "Text");
-
-console.log(parente.outerHTML);
-// "<div><p></p><span></span>Text</div>"
- -

ChildNode.after() is unscopable

- -

The after() method is not scoped into the with statement. Veja {{jsxref("Symbol.unscopables")}} para maior infomação.

- -
with(node) {
-  after("foo");
-}
-// ReferenceError: after is not defined 
- -

Polyfill

- -

Você pode usar polyfill com  o método  after()  no Internet Explorer 9 e com o seguinte código:

- -
//from: https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/after()/after().md
-(function (arr) {
-  arr.forEach(function (item) {
-    if (item.hasOwnProperty('after')) {
-      return;
-    }
-    Object.defineProperty(item, 'after', {
-      configurable: true,
-      enumerable: true,
-      writable: true,
-      value: function after() {
-        var argArr = Array.prototype.slice.call(arguments),
-          docFrag = document.createDocumentFragment();
-
-        argArr.forEach(function (argItem) {
-          var isNode = argItem instanceof Node;
-          docFrag.appendChild(isNode ? argItem : document.createTextNode(String(argItem)));
-        });
-
-        this.parentNode.insertBefore(docFrag, this.nextSibling);
-      }
-    });
-  });
-})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
- -

 

- -
//https://github.com/FabioVergani/js-Polyfill_Element.prototype.after/blob/master/after.js
-
-(function(x){
- var o=x.prototype,p='after';
- if(!o[p]){
-    o[p]=function(){
-     var e, m=arguments, l=m.length, i=0, t=this, p=t.parentNode, n=Node, s=String, d=document;
-     if(p!==null){
-        while(i<l){
-         e=m[i];
-         if(e instanceof n){
-            t=t.nextSibling;
-            if(t!==null){
-                p.insertBefore(e,t);
-            }else{
-                p.appendChild(e);
-            };
-         }else{
-            p.appendChild(d.createTextNode(s(e)));
-         };
-         ++i;
-        };
-     };
-    };
- };
-})(Element);
-
-
-
-/*
-min:
-
-(function(x){
- var o=x.prototype;
- o.after||(o.after=function(){var e,m=arguments,l=m.length,i=0,t=this,p=t.parentNode,n=Node,s=String,d=document;if(p!==null){while(i<l){((e=m[i]) instanceof n)?(((t=t.nextSibling )!==null)?p.insertBefore(e,t):p.appendChild(e)):p.appendChild(d.createTextNode(s(e)));++i;}}});
-}(Element));
-
-*/
-
- -

 

- -

Especificação

- - - - - - - - - - - - - - -
EspecificaçãoStatusComentário
{{SpecName('DOM WHATWG', '#dom-childnode-after', 'ChildNode.after()')}}{{Spec2('DOM WHATWG')}}Initial definition.
- -

Compatibilidade com navegadores

- -

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

- -

Veja mais

- - diff --git a/files/pt-br/orphaned/web/api/childnode/index.html b/files/pt-br/orphaned/web/api/childnode/index.html deleted file mode 100644 index 282b89ee3a..0000000000 --- a/files/pt-br/orphaned/web/api/childnode/index.html +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: ChildNode -slug: orphaned/Web/API/ChildNode -tags: - - API - - DOM - - Experimental - - Interface - - NeedsTranslation - - Node - - TopicStub -translation_of: Web/API/ChildNode -original_slug: Web/API/ChildNode ---- -
{{APIRef("DOM")}}
- -
A interface ChildNode contém métodos que são particulares para os objetos
- -

{{domxref("Node")}} que podem ter um pai.

- -

ChildNode é uma interface bruta e nenhum objeto desse tipo pode ser criado; eles são implementados pelos objetos {{domxref("Element")}}, {{domxref("DocumentType")}}, e {{domxref("CharacterData")}}.

- -

Propriedades

- -

Não há propriedades herdadas nem específicas.

- -

Métodos

- -

Não há métodos herdados.

- -
-
{{domxref("ChildNode.remove()")}} {{experimental_inline}}
-
Removes this ChildNode from the children list of its parent.
-
{{domxref("ChildNode.before()")}} {{experimental_inline}}
-
Inserts a set of {{domxref("Node")}} or {{domxref("DOMString")}} objects in the children list of this ChildNode's parent, just before this ChildNode. {{domxref("DOMString")}} objects are inserted as equivalent {{domxref("Text")}} nodes.
-
{{domxref("ChildNode.after()")}} {{experimental_inline}}
-
Inserts a set of {{domxref("Node")}} or {{domxref("DOMString")}} objects in the children list of this ChildNode's parent, just after this ChildNode. {{domxref("DOMString")}} objects are inserted as equivalent {{domxref("Text")}} nodes.
-
{{domxref("ChildNode.replaceWith()")}} {{experimental_inline}}
-
Replaces this ChildNode 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.
-
- -

Especificações

- - - - - - - - - - - - - - - - - - - -
EspecificaçãoStatusComentário
{{SpecName('DOM WHATWG', '#interface-childnode', 'ChildNode')}}{{Spec2('DOM WHATWG')}}Split the ElementTraversal interface in {{domxref("ParentNode")}} and ChildNode. previousElementSibling and nextElementSibling are now defined on the latter. The {{domxref("CharacterData")}} and {{domxref("DocumentType")}} implemented the new interfaces. Added the remove(), before(), after() and replaceWith() methods.
{{SpecName('Element Traversal', '#interface-elementTraversal', 'ElementTraversal')}}{{Spec2('Element Traversal')}}Added the initial definition of its properties to the ElementTraversal pure interface and use it on {{domxref("Element")}}.
- -

Polyfill

- -

External on github: childNode.js

- -

Compatibilidade com navegadores

- -

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

- -

See also

- - diff --git a/files/pt-br/orphaned/web/api/childnode/remove/index.html b/files/pt-br/orphaned/web/api/childnode/remove/index.html deleted file mode 100644 index 57dcc06698..0000000000 --- a/files/pt-br/orphaned/web/api/childnode/remove/index.html +++ /dev/null @@ -1,101 +0,0 @@ ---- -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

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