From db26cf86829f9b43d29f18b9bbf197e9e2d55c31 Mon Sep 17 00:00:00 2001 From: MDN Date: Wed, 14 Apr 2021 00:11:31 +0000 Subject: [CRON] sync translated content --- files/es/_redirects.txt | 1 + files/es/_wikihistory.json | 16 +-- .../web/api/parentnode/children/index.html | 158 +++++++++++++++++++++ files/es/web/api/parentnode/children/index.html | 157 -------------------- files/fr/_redirects.txt | 1 + files/fr/_wikihistory.json | 20 +-- .../web/api/parentnode/children/index.html | 90 ++++++++++++ files/fr/web/api/parentnode/children/index.html | 89 ------------ files/it/_redirects.txt | 1 + files/it/_wikihistory.json | 12 +- .../web/api/parentnode/children/index.html | 96 +++++++++++++ files/it/web/api/parentnode/children/index.html | 95 ------------- files/ja/_redirects.txt | 1 + files/ja/_wikihistory.json | 14 +- .../web/api/parentnode/children/index.html | 95 +++++++++++++ files/ja/web/api/parentnode/children/index.html | 94 ------------ files/ko/_redirects.txt | 1 + files/ko/_wikihistory.json | 12 +- .../web/api/parentnode/children/index.html | 86 +++++++++++ files/ko/web/api/parentnode/children/index.html | 85 ----------- files/pl/_redirects.txt | 6 + files/pl/_wikihistory.json | 12 +- .../web/api/parentnode/children/index.html | 97 +++++++++++++ files/pl/web/api/parentnode/children/index.html | 96 ------------- files/pt-br/_redirects.txt | 1 + files/pt-br/_wikihistory.json | 12 +- .../web/api/parentnode/children/index.html | 132 +++++++++++++++++ files/pt-br/web/api/parentnode/children/index.html | 131 ----------------- files/ru/_redirects.txt | 1 + files/ru/_wikihistory.json | 20 +-- .../web/api/parentnode/children/index.html | 144 +++++++++++++++++++ files/ru/web/api/parentnode/children/index.html | 143 ------------------- files/zh-cn/_redirects.txt | 5 +- files/zh-cn/_wikihistory.json | 22 +-- .../web/api/parentnode/children/index.html | 118 +++++++++++++++ files/zh-cn/web/api/parentnode/children/index.html | 117 --------------- files/zh-tw/_redirects.txt | 1 + files/zh-tw/_wikihistory.json | 12 +- .../web/api/parentnode/children/index.html | 153 ++++++++++++++++++++ files/zh-tw/web/api/parentnode/children/index.html | 152 -------------------- 40 files changed, 1262 insertions(+), 1237 deletions(-) create mode 100644 files/es/orphaned/web/api/parentnode/children/index.html delete mode 100644 files/es/web/api/parentnode/children/index.html create mode 100644 files/fr/orphaned/web/api/parentnode/children/index.html delete mode 100644 files/fr/web/api/parentnode/children/index.html create mode 100644 files/it/orphaned/web/api/parentnode/children/index.html delete mode 100644 files/it/web/api/parentnode/children/index.html create mode 100644 files/ja/orphaned/web/api/parentnode/children/index.html delete mode 100644 files/ja/web/api/parentnode/children/index.html create mode 100644 files/ko/orphaned/web/api/parentnode/children/index.html delete mode 100644 files/ko/web/api/parentnode/children/index.html create mode 100644 files/pl/orphaned/web/api/parentnode/children/index.html delete mode 100644 files/pl/web/api/parentnode/children/index.html create mode 100644 files/pt-br/orphaned/web/api/parentnode/children/index.html delete mode 100644 files/pt-br/web/api/parentnode/children/index.html create mode 100644 files/ru/orphaned/web/api/parentnode/children/index.html delete mode 100644 files/ru/web/api/parentnode/children/index.html create mode 100644 files/zh-cn/orphaned/web/api/parentnode/children/index.html delete mode 100644 files/zh-cn/web/api/parentnode/children/index.html create mode 100644 files/zh-tw/orphaned/web/api/parentnode/children/index.html delete mode 100644 files/zh-tw/web/api/parentnode/children/index.html diff --git a/files/es/_redirects.txt b/files/es/_redirects.txt index 00ecdbc826..751961e8eb 100644 --- a/files/es/_redirects.txt +++ b/files/es/_redirects.txt @@ -1832,6 +1832,7 @@ /es/docs/Web/API/NonDocumentTypeChildNode/previousElementSibling /es/docs/Web/API/Element/previousElementSibling /es/docs/Web/API/Notifications_API/Usando_la_API_de_Notificaciones /es/docs/Web/API/Notifications_API/Using_the_Notifications_API /es/docs/Web/API/ParentNode/childElementCount /es/docs/Web/API/Element/childElementCount +/es/docs/Web/API/ParentNode/children /es/docs/orphaned/Web/API/ParentNode/children /es/docs/Web/API/Position /es/docs/Web/API/GeolocationPosition /es/docs/Web/API/Push_API/Using_the_Push_API /es/docs/conflicting/Web/API/Push_API /es/docs/Web/API/RandomSource /es/docs/conflicting/Web/API/Crypto/getRandomValues diff --git a/files/es/_wikihistory.json b/files/es/_wikihistory.json index a2a124aec6..f2fcc7d5f9 100644 --- a/files/es/_wikihistory.json +++ b/files/es/_wikihistory.json @@ -5871,14 +5871,6 @@ "Kyuoraku" ] }, - "Web/API/ParentNode/children": { - "modified": "2019-03-23T22:32:44.383Z", - "contributors": [ - "AlePerez92", - "aeroxmotion", - "Grijander81" - ] - }, "Web/API/ParentNode/firstElementChild": { "modified": "2019-03-23T22:32:44.779Z", "contributors": [ @@ -23743,5 +23735,13 @@ "contributors": [ "joselix" ] + }, + "orphaned/Web/API/ParentNode/children": { + "modified": "2019-03-23T22:32:44.383Z", + "contributors": [ + "AlePerez92", + "aeroxmotion", + "Grijander81" + ] } } \ No newline at end of file diff --git a/files/es/orphaned/web/api/parentnode/children/index.html b/files/es/orphaned/web/api/parentnode/children/index.html new file mode 100644 index 0000000000..f8ae9e5831 --- /dev/null +++ b/files/es/orphaned/web/api/parentnode/children/index.html @@ -0,0 +1,158 @@ +--- +title: ParentNode.children +slug: orphaned/Web/API/ParentNode/children +tags: + - API + - DOM + - ParentNode + - Propiedad +translation_of: Web/API/ParentNode/children +original_slug: Web/API/ParentNode/children +--- +

{{ APIRef("DOM") }}

+ +

Node.children es una propiedad de sólo lectura que retorna una {{domxref("HTMLCollection")}} "viva" de los elementos hijos de un Node.

+ +

Sintaxis

+ +
var children = node.children; 
+ +

children es una {{ domxref("HTMLCollection") }}, que es una colección ordenada de los elementos DOM que son hijos de node. Si no hay elementos hijos, entonces children no contendrá elementos y su longitud ( length )  será 0.

+ +

Ejemplo

+ +
var foo = document.getElementById('foo');
+for (var i = 0; i < foo.children.length; i++) {
+    console.log(foo.children[i].tagName);
+}
+
+ +

Polyfill

+ +
// Sobrescribe el prototipo 'children' nativo.
+// Añade soporte para Document y DocumentFragment en IE9 y Safari.
+// Devuelve un array en lugar de HTMLCollection.
+;(function(constructor) {
+    if (constructor &&
+        constructor.prototype &&
+        constructor.prototype.children == null) {
+        Object.defineProperty(constructor.prototype, 'children', {
+            get: function() {
+                var i = 0, node, nodes = this.childNodes, children = [];
+                while (node = nodes[i++]) {
+                    if (node.nodeType === 1) {
+                        children.push(node);
+                    }
+                }
+                return children;
+            }
+        });
+    }
+})(window.Node || window.Element);
+
+ +

Especificación

+ + + + + + + + + + + + + + +
EspecificaciónEstadoObservaciones
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Definición Inicial
+ +

Compatibilidad con navegadores

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerEdgeOperaSafari
Soporte básico (en {{domxref("Element")}})1.0{{CompatGeckoDesktop("1.9.1")}}9.0 [1]38.010.04.0
Soporte en {{domxref("Document")}} y {{domxref("DocumentFragment")}} {{experimental_inline}}29.0{{CompatGeckoDesktop("25.0")}}{{CompatNo}}{{CompatNo}}16.0{{CompatNo}}
Soporte en {{domxref("SVGElement")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Soporte básico (en {{domxref("Element")}}){{ CompatVersionUnknown() }}{{CompatGeckoMobile("1.9.1")}}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
Soporte básico {{domxref("Document")}} y {{domxref("DocumentFragment")}} {{experimental_inline}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25.0")}}{{CompatNo}}16.0{{CompatNo}}
+
+ +

[1] Internet Explorer 6, 7 y 8 lo soportan, pero incluyen nodos {{domxref("Comment")}} de manera errónea.

+ +

Ver también

+ + diff --git a/files/es/web/api/parentnode/children/index.html b/files/es/web/api/parentnode/children/index.html deleted file mode 100644 index 8a9071830c..0000000000 --- a/files/es/web/api/parentnode/children/index.html +++ /dev/null @@ -1,157 +0,0 @@ ---- -title: ParentNode.children -slug: Web/API/ParentNode/children -tags: - - API - - DOM - - ParentNode - - Propiedad -translation_of: Web/API/ParentNode/children ---- -

{{ APIRef("DOM") }}

- -

Node.children es una propiedad de sólo lectura que retorna una {{domxref("HTMLCollection")}} "viva" de los elementos hijos de un Node.

- -

Sintaxis

- -
var children = node.children; 
- -

children es una {{ domxref("HTMLCollection") }}, que es una colección ordenada de los elementos DOM que son hijos de node. Si no hay elementos hijos, entonces children no contendrá elementos y su longitud ( length )  será 0.

- -

Ejemplo

- -
var foo = document.getElementById('foo');
-for (var i = 0; i < foo.children.length; i++) {
-    console.log(foo.children[i].tagName);
-}
-
- -

Polyfill

- -
// Sobrescribe el prototipo 'children' nativo.
-// Añade soporte para Document y DocumentFragment en IE9 y Safari.
-// Devuelve un array en lugar de HTMLCollection.
-;(function(constructor) {
-    if (constructor &&
-        constructor.prototype &&
-        constructor.prototype.children == null) {
-        Object.defineProperty(constructor.prototype, 'children', {
-            get: function() {
-                var i = 0, node, nodes = this.childNodes, children = [];
-                while (node = nodes[i++]) {
-                    if (node.nodeType === 1) {
-                        children.push(node);
-                    }
-                }
-                return children;
-            }
-        });
-    }
-})(window.Node || window.Element);
-
- -

Especificación

- - - - - - - - - - - - - - -
EspecificaciónEstadoObservaciones
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Definición Inicial
- -

Compatibilidad con navegadores

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracterísticaChromeFirefox (Gecko)Internet ExplorerEdgeOperaSafari
Soporte básico (en {{domxref("Element")}})1.0{{CompatGeckoDesktop("1.9.1")}}9.0 [1]38.010.04.0
Soporte en {{domxref("Document")}} y {{domxref("DocumentFragment")}} {{experimental_inline}}29.0{{CompatGeckoDesktop("25.0")}}{{CompatNo}}{{CompatNo}}16.0{{CompatNo}}
Soporte en {{domxref("SVGElement")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
CaracterísticaAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Soporte básico (en {{domxref("Element")}}){{ CompatVersionUnknown() }}{{CompatGeckoMobile("1.9.1")}}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
Soporte básico {{domxref("Document")}} y {{domxref("DocumentFragment")}} {{experimental_inline}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25.0")}}{{CompatNo}}16.0{{CompatNo}}
-
- -

[1] Internet Explorer 6, 7 y 8 lo soportan, pero incluyen nodos {{domxref("Comment")}} de manera errónea.

- -

Ver también

- - diff --git a/files/fr/_redirects.txt b/files/fr/_redirects.txt index f956671d39..08f6d17707 100644 --- a/files/fr/_redirects.txt +++ b/files/fr/_redirects.txt @@ -3800,6 +3800,7 @@ /fr/docs/Web/API/Node/prefix /fr/docs/conflicting/Web/API/Element/prefix /fr/docs/Web/API/Node/rootNode /fr/docs/conflicting/Web/API/Node/getRootNode /fr/docs/Web/API/ParentNode/childElementCount /fr/docs/Web/API/Element/childElementCount +/fr/docs/Web/API/ParentNode/children /fr/docs/orphaned/Web/API/ParentNode/children /fr/docs/Web/API/PasswordCredential/additionalData /fr/docs/conflicting/Web/API/PasswordCredential /fr/docs/Web/API/PasswordCredential/idName /fr/docs/conflicting/Web/API/PasswordCredential_cbf7b306e83a3f58ff06bccf89637c12 /fr/docs/Web/API/PasswordCredential/passwordName /fr/docs/conflicting/Web/API/PasswordCredential_bc57d5dfa87242b4fb83497887124f41 diff --git a/files/fr/_wikihistory.json b/files/fr/_wikihistory.json index c66afaeeff..7691f6cf76 100644 --- a/files/fr/_wikihistory.json +++ b/files/fr/_wikihistory.json @@ -11700,16 +11700,6 @@ "ayshiff" ] }, - "Web/API/ParentNode/children": { - "modified": "2020-10-15T21:43:07.206Z", - "contributors": [ - "Arzak656", - "jMoulis", - "loella16", - "NemoNobobyPersonne", - "xavierartot" - ] - }, "Web/API/ParentNode/firstElementChild": { "modified": "2019-03-23T23:35:50.443Z", "contributors": [ @@ -45335,5 +45325,15 @@ "xavierartot", "vava" ] + }, + "orphaned/Web/API/ParentNode/children": { + "modified": "2020-10-15T21:43:07.206Z", + "contributors": [ + "Arzak656", + "jMoulis", + "loella16", + "NemoNobobyPersonne", + "xavierartot" + ] } } \ No newline at end of file diff --git a/files/fr/orphaned/web/api/parentnode/children/index.html b/files/fr/orphaned/web/api/parentnode/children/index.html new file mode 100644 index 0000000000..7fed7973ec --- /dev/null +++ b/files/fr/orphaned/web/api/parentnode/children/index.html @@ -0,0 +1,90 @@ +--- +title: ParentNode.children +slug: orphaned/Web/API/ParentNode/children +tags: + - API + - DOM + - Noeuds + - Propriétés + - parent +translation_of: Web/API/ParentNode/children +original_slug: Web/API/ParentNode/children +--- +

{{ APIRef("DOM") }}

+ +

La propriété children de {{domxref("ParentNode")}} est une propriété en lecture seule qui renvoie une {{domxref("HTMLCollection")}} directe contenant tous les enfants {{domxref("Element","éléments")}} du noeud sur lequel elle a été appelée.

+ +

Syntaxe

+ +
var children = node.children;
+ +

Valeur

+ +

Une {{ domxref("HTMLCollection") }}, qui est une collection directe et ordonnée des éléments DOM qui sont enfants du node (noeud). Vous pouvez accéder aux noeuds enfants individuellement en utilisant la méthode  {{domxref("HTMLCollection.item", "item()")}} (élément) sur la collection ou en utilisant la notation de type tableau (array) de JavaScript.

+ +

S'il n'y a pas d'éléments enfants, alors children est une liste vide et a une length (longueur) de 0.

+ +

Exemple

+ +
var machin = document.getElementById('machin');
+for (var i = 0; i < machin.children.length; i++) {
+    console.log(machin.children[i].tagName);
+}
+ +

Polyfill

+ +
// Réécrit le prototype 'children' natif.
+// Ajoute le support de Document & DocumentFragment pour IE9 & Safari.
+// Renvoie un tableau (array) au lieu d'une HTMLCollection.
+;(function(constructeur) {
+    if (constructeur &&
+        constructeur.prototype &&
+        constructeur.prototype.children == null) {
+        Object.defineProperty(constructeur.prototype, 'children', {
+            get: function() {
+                var i = 0, noeud, noeuds = this.childNodes, children = [];
+                while (noeud = noeuds[i++]) {
+                    if (noeud.nodeType === 1) {
+                        children.push(noeud);
+                    }
+                }
+                return children;
+            }
+        });
+    }
+})(window.Node || window.Element);
+ +

Spécification

+ + + + + + + + + + + + + + +
SpécificationStatutCommentaire
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Définition initiale.
+ +

Compatibilité des navigateurs

+ + + +

{{Compat("api.ParentNode.children")}}

+ +

Voir aussi

+ + diff --git a/files/fr/web/api/parentnode/children/index.html b/files/fr/web/api/parentnode/children/index.html deleted file mode 100644 index 52c529a1b8..0000000000 --- a/files/fr/web/api/parentnode/children/index.html +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: ParentNode.children -slug: Web/API/ParentNode/children -tags: - - API - - DOM - - Noeuds - - Propriétés - - parent -translation_of: Web/API/ParentNode/children ---- -

{{ APIRef("DOM") }}

- -

La propriété children de {{domxref("ParentNode")}} est une propriété en lecture seule qui renvoie une {{domxref("HTMLCollection")}} directe contenant tous les enfants {{domxref("Element","éléments")}} du noeud sur lequel elle a été appelée.

- -

Syntaxe

- -
var children = node.children;
- -

Valeur

- -

Une {{ domxref("HTMLCollection") }}, qui est une collection directe et ordonnée des éléments DOM qui sont enfants du node (noeud). Vous pouvez accéder aux noeuds enfants individuellement en utilisant la méthode  {{domxref("HTMLCollection.item", "item()")}} (élément) sur la collection ou en utilisant la notation de type tableau (array) de JavaScript.

- -

S'il n'y a pas d'éléments enfants, alors children est une liste vide et a une length (longueur) de 0.

- -

Exemple

- -
var machin = document.getElementById('machin');
-for (var i = 0; i < machin.children.length; i++) {
-    console.log(machin.children[i].tagName);
-}
- -

Polyfill

- -
// Réécrit le prototype 'children' natif.
-// Ajoute le support de Document & DocumentFragment pour IE9 & Safari.
-// Renvoie un tableau (array) au lieu d'une HTMLCollection.
-;(function(constructeur) {
-    if (constructeur &&
-        constructeur.prototype &&
-        constructeur.prototype.children == null) {
-        Object.defineProperty(constructeur.prototype, 'children', {
-            get: function() {
-                var i = 0, noeud, noeuds = this.childNodes, children = [];
-                while (noeud = noeuds[i++]) {
-                    if (noeud.nodeType === 1) {
-                        children.push(noeud);
-                    }
-                }
-                return children;
-            }
-        });
-    }
-})(window.Node || window.Element);
- -

Spécification

- - - - - - - - - - - - - - -
SpécificationStatutCommentaire
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Définition initiale.
- -

Compatibilité des navigateurs

- - - -

{{Compat("api.ParentNode.children")}}

- -

Voir aussi

- - diff --git a/files/it/_redirects.txt b/files/it/_redirects.txt index fb151fd05a..4a4e9cfcb4 100644 --- a/files/it/_redirects.txt +++ b/files/it/_redirects.txt @@ -527,6 +527,7 @@ /it/docs/Web/API/Navigator.cookieEnabled /it/docs/Web/API/Navigator/cookieEnabled /it/docs/Web/API/Node/namespaceURI /it/docs/Web/API/Element/namespaceURI /it/docs/Web/API/Node/prefix /it/docs/Web/API/Element/prefix +/it/docs/Web/API/ParentNode/children /it/docs/orphaned/Web/API/ParentNode/children /it/docs/Web/API/Position /it/docs/Web/API/GeolocationPosition /it/docs/Web/API/URLUtils /it/docs/orphaned/Web/API/HTMLHyperlinkElementUtils /it/docs/Web/API/WindowTimers /it/docs/conflicting/Web/API/WindowOrWorkerGlobalScope diff --git a/files/it/_wikihistory.json b/files/it/_wikihistory.json index 786b9a17e4..d79fc797b5 100644 --- a/files/it/_wikihistory.json +++ b/files/it/_wikihistory.json @@ -1643,12 +1643,6 @@ "ExE-Boss" ] }, - "Web/API/ParentNode/children": { - "modified": "2020-10-15T22:13:17.341Z", - "contributors": [ - "IsibisiDev" - ] - }, "Web/API/ParentNode/firstElementChild": { "modified": "2020-10-15T22:17:20.523Z", "contributors": [ @@ -5994,5 +5988,11 @@ "jsx", "Federico" ] + }, + "orphaned/Web/API/ParentNode/children": { + "modified": "2020-10-15T22:13:17.341Z", + "contributors": [ + "IsibisiDev" + ] } } \ No newline at end of file diff --git a/files/it/orphaned/web/api/parentnode/children/index.html b/files/it/orphaned/web/api/parentnode/children/index.html new file mode 100644 index 0000000000..d5df5c6364 --- /dev/null +++ b/files/it/orphaned/web/api/parentnode/children/index.html @@ -0,0 +1,96 @@ +--- +title: ParentNode.children +slug: orphaned/Web/API/ParentNode/children +tags: + - API + - Child + - Child Nodes + - DOM + - HTMLCollection + - Node + - ParentNode + - Proprietà + - children +translation_of: Web/API/ParentNode/children +original_slug: Web/API/ParentNode/children +--- +
{{ APIRef("DOM") }}
+ +

La proprietà {{domxref("ParentNode")}} children è una proprietà di sola lettura che restituisce una {{domxref("HTMLCollection")}} dinamica che contiene tutti gli {{domxref("Element","elements")}} figli del nodo su cui è stato chiamato.

+ +

Sintassi

+ +
var children = node.children;
+ +

Valore

+ +

Una {{ domxref("HTMLCollection") }} che è dimanica, raccolta ordinata degli elementi DOM che sono figli di node. È possibile accedere ai singoli nodi figlio nella raccolta utilizzando il metodo {{domxref("HTMLCollection.item", "item()")}} nella collezione o utilizzando la notazione in stile array JavaScript.

+ +

Se il nodo non ha elementi figli, children è una lista vuota con una length di 0.

+ +

Esempio

+ +
var foo = document.getElementById('foo');
+for (var i = 0; i < foo.children.length; i++) {
+    console.log(foo.children[i].tagName);
+}
+
+ +

Polyfill

+ +
// Sovrascrive il prototipo nativo di "children".
+// Aggiunge il supporto Document e DocumentFragment per IE9 & Safari.
+// Restituisce un array invece di una HTMLCollection.
+;(function(constructor) {
+    if (constructor &&
+        constructor.prototype &&
+        constructor.prototype.children == null) {
+        Object.defineProperty(constructor.prototype, 'children', {
+            get: function() {
+                var i = 0, node, nodes = this.childNodes, children = [];
+                while (node = nodes[i++]) {
+                    if (node.nodeType === 1) {
+                        children.push(node);
+                    }
+                }
+                return children;
+            }
+        });
+    }
+})(window.Node || window.Element);
+
+ +

Specifiche

+ + + + + + + + + + + + + + +
SpecificaStatoCommento
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Definizione iniziale.
+ +

Compatibilità con i browser

+ + + +

{{Compat("api.ParentNode.children")}}

+ +

Vedi anche

+ + diff --git a/files/it/web/api/parentnode/children/index.html b/files/it/web/api/parentnode/children/index.html deleted file mode 100644 index 7bedb73eed..0000000000 --- a/files/it/web/api/parentnode/children/index.html +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: ParentNode.children -slug: Web/API/ParentNode/children -tags: - - API - - Child - - Child Nodes - - DOM - - HTMLCollection - - Node - - ParentNode - - Proprietà - - children -translation_of: Web/API/ParentNode/children ---- -
{{ APIRef("DOM") }}
- -

La proprietà {{domxref("ParentNode")}} children è una proprietà di sola lettura che restituisce una {{domxref("HTMLCollection")}} dinamica che contiene tutti gli {{domxref("Element","elements")}} figli del nodo su cui è stato chiamato.

- -

Sintassi

- -
var children = node.children;
- -

Valore

- -

Una {{ domxref("HTMLCollection") }} che è dimanica, raccolta ordinata degli elementi DOM che sono figli di node. È possibile accedere ai singoli nodi figlio nella raccolta utilizzando il metodo {{domxref("HTMLCollection.item", "item()")}} nella collezione o utilizzando la notazione in stile array JavaScript.

- -

Se il nodo non ha elementi figli, children è una lista vuota con una length di 0.

- -

Esempio

- -
var foo = document.getElementById('foo');
-for (var i = 0; i < foo.children.length; i++) {
-    console.log(foo.children[i].tagName);
-}
-
- -

Polyfill

- -
// Sovrascrive il prototipo nativo di "children".
-// Aggiunge il supporto Document e DocumentFragment per IE9 & Safari.
-// Restituisce un array invece di una HTMLCollection.
-;(function(constructor) {
-    if (constructor &&
-        constructor.prototype &&
-        constructor.prototype.children == null) {
-        Object.defineProperty(constructor.prototype, 'children', {
-            get: function() {
-                var i = 0, node, nodes = this.childNodes, children = [];
-                while (node = nodes[i++]) {
-                    if (node.nodeType === 1) {
-                        children.push(node);
-                    }
-                }
-                return children;
-            }
-        });
-    }
-})(window.Node || window.Element);
-
- -

Specifiche

- - - - - - - - - - - - - - -
SpecificaStatoCommento
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Definizione iniziale.
- -

Compatibilità con i browser

- - - -

{{Compat("api.ParentNode.children")}}

- -

Vedi anche

- - diff --git a/files/ja/_redirects.txt b/files/ja/_redirects.txt index 8e454ee1ea..44f528c814 100644 --- a/files/ja/_redirects.txt +++ b/files/ja/_redirects.txt @@ -3924,6 +3924,7 @@ /ja/docs/Web/API/NodeList.item /ja/docs/Web/API/NodeList/item /ja/docs/Web/API/NonDocumentTypeChildNode /ja/docs/conflicting/Web/API/Element_861159909c20acebf8e506c3bb0e2f7e /ja/docs/Web/API/ParentNode/childElementCount /ja/docs/Web/API/Element/childElementCount +/ja/docs/Web/API/ParentNode/children /ja/docs/orphaned/Web/API/ParentNode/children /ja/docs/Web/API/Position /ja/docs/Web/API/GeolocationPosition /ja/docs/Web/API/PositionError /ja/docs/Web/API/GeolocationPositionError /ja/docs/Web/API/Push_API/Using_the_Push_API /ja/docs/Web/API/Push_API diff --git a/files/ja/_wikihistory.json b/files/ja/_wikihistory.json index 7a4ab0de94..d0b870246b 100644 --- a/files/ja/_wikihistory.json +++ b/files/ja/_wikihistory.json @@ -19095,13 +19095,6 @@ "isdh" ] }, - "Web/API/ParentNode/children": { - "modified": "2020-11-23T04:45:58.549Z", - "contributors": [ - "segayuu", - "sii" - ] - }, "Web/API/ParentNode/prepend": { "modified": "2020-10-15T22:22:02.876Z", "contributors": [ @@ -53496,5 +53489,12 @@ "yumetodo", "Marsf" ] + }, + "orphaned/Web/API/ParentNode/children": { + "modified": "2020-11-23T04:45:58.549Z", + "contributors": [ + "segayuu", + "sii" + ] } } \ No newline at end of file diff --git a/files/ja/orphaned/web/api/parentnode/children/index.html b/files/ja/orphaned/web/api/parentnode/children/index.html new file mode 100644 index 0000000000..2573bd3621 --- /dev/null +++ b/files/ja/orphaned/web/api/parentnode/children/index.html @@ -0,0 +1,95 @@ +--- +title: ParentNode.children +slug: orphaned/Web/API/ParentNode/children +tags: + - API + - Child + - Child Nodes + - DOM + - HTMLCollection + - Node + - ParentNode + - Property + - children +translation_of: Web/API/ParentNode/children +original_slug: Web/API/ParentNode/children +--- +
{{ APIRef("DOM") }}
+ +

{{domxref("ParentNode")}} の children プロパティは、呼び出された際のノードの子{{domxref("Element", "要素", "", 1)}}ノードをすべて含んだ動的な(生きている) {{domxref("HTMLCollection")}} を返す、読み取り専用プロパティです。

+ +

構文

+ +
let children = node.children;
+ +

+ +

node の子の DOM要素の生きている順序付きコレクションの、 {{ domxref("HTMLCollection") }} です。コレクションの {{domxref("HTMLCollection.item()", "item()")}} メソッドか、JavaScript の配列スタイルの記法を使って、コレクション内の個々の子ノードにアクセスすることができます。

+ +

ノードが子要素を持たない場合、 children は要素を含まず、length0 です。

+ +

例 

+ +
const foo = document.getElementById('foo');
+for (let i = 0; i < foo.children.length; i++) {
+  console.log(foo.children[i].tagName);
+}
+ +

Polyfill

+ +
// Overwrites native 'children' prototype.
+// Adds Document & DocumentFragment support for IE9 & Safari.
+// Returns array instead of HTMLCollection.
+;(function(constructor) {
+  if (constructor &&
+    constructor.prototype &&
+    constructor.prototype.children == null) {
+    Object.defineProperty(constructor.prototype, 'children', {
+      get: function() {
+        let i = 0, node, nodes = this.childNodes, children = [];
+        while (node = nodes[i++]) {
+          if (node.nodeType === 1) {
+            children.push(node);
+          }
+        }
+        return children;
+      }
+    });
+  }
+})(window.Node || window.Element);
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}初めての定義
+ +

ブラウザー実装状況

+ + + +

{{Compat("api.ParentNode.children")}}

+ +

関連情報

+ + diff --git a/files/ja/web/api/parentnode/children/index.html b/files/ja/web/api/parentnode/children/index.html deleted file mode 100644 index e451a81b69..0000000000 --- a/files/ja/web/api/parentnode/children/index.html +++ /dev/null @@ -1,94 +0,0 @@ ---- -title: ParentNode.children -slug: Web/API/ParentNode/children -tags: - - API - - Child - - Child Nodes - - DOM - - HTMLCollection - - Node - - ParentNode - - Property - - children -translation_of: Web/API/ParentNode/children ---- -
{{ APIRef("DOM") }}
- -

{{domxref("ParentNode")}} の children プロパティは、呼び出された際のノードの子{{domxref("Element", "要素", "", 1)}}ノードをすべて含んだ動的な(生きている) {{domxref("HTMLCollection")}} を返す、読み取り専用プロパティです。

- -

構文

- -
let children = node.children;
- -

- -

node の子の DOM要素の生きている順序付きコレクションの、 {{ domxref("HTMLCollection") }} です。コレクションの {{domxref("HTMLCollection.item()", "item()")}} メソッドか、JavaScript の配列スタイルの記法を使って、コレクション内の個々の子ノードにアクセスすることができます。

- -

ノードが子要素を持たない場合、 children は要素を含まず、length0 です。

- -

例 

- -
const foo = document.getElementById('foo');
-for (let i = 0; i < foo.children.length; i++) {
-  console.log(foo.children[i].tagName);
-}
- -

Polyfill

- -
// Overwrites native 'children' prototype.
-// Adds Document & DocumentFragment support for IE9 & Safari.
-// Returns array instead of HTMLCollection.
-;(function(constructor) {
-  if (constructor &&
-    constructor.prototype &&
-    constructor.prototype.children == null) {
-    Object.defineProperty(constructor.prototype, 'children', {
-      get: function() {
-        let i = 0, node, nodes = this.childNodes, children = [];
-        while (node = nodes[i++]) {
-          if (node.nodeType === 1) {
-            children.push(node);
-          }
-        }
-        return children;
-      }
-    });
-  }
-})(window.Node || window.Element);
-
- -

仕様

- - - - - - - - - - - - - - -
仕様状態コメント
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}初めての定義
- -

ブラウザー実装状況

- - - -

{{Compat("api.ParentNode.children")}}

- -

関連情報

- - diff --git a/files/ko/_redirects.txt b/files/ko/_redirects.txt index c3d8339b2d..75f135b7b3 100644 --- a/files/ko/_redirects.txt +++ b/files/ko/_redirects.txt @@ -661,6 +661,7 @@ /ko/docs/Web/API/Node/innerText /ko/docs/Web/API/HTMLElement/innerText /ko/docs/Web/API/Notification.permission /ko/docs/Web/API/Notification/permission /ko/docs/Web/API/ParentNode/childElementCount /ko/docs/Web/API/Element/childElementCount +/ko/docs/Web/API/ParentNode/children /ko/docs/orphaned/Web/API/ParentNode/children /ko/docs/Web/API/Position /ko/docs/Web/API/GeolocationPosition /ko/docs/Web/API/RandomSource /ko/docs/Web/API/Crypto/getRandomValues /ko/docs/Web/API/RandomSource/getRandomValues /ko/docs/Web/API/Crypto/getRandomValues diff --git a/files/ko/_wikihistory.json b/files/ko/_wikihistory.json index 499ebbef7b..7e84e41438 100644 --- a/files/ko/_wikihistory.json +++ b/files/ko/_wikihistory.json @@ -5183,12 +5183,6 @@ "ChanMyeong" ] }, - "Web/API/ParentNode/children": { - "modified": "2020-10-15T22:08:09.823Z", - "contributors": [ - "whdckszxxx" - ] - }, "Web/API/ParentNode/prepend": { "modified": "2020-10-15T22:19:18.906Z", "contributors": [ @@ -18704,5 +18698,11 @@ "contributors": [ "zzoPark" ] + }, + "orphaned/Web/API/ParentNode/children": { + "modified": "2020-10-15T22:08:09.823Z", + "contributors": [ + "whdckszxxx" + ] } } \ No newline at end of file diff --git a/files/ko/orphaned/web/api/parentnode/children/index.html b/files/ko/orphaned/web/api/parentnode/children/index.html new file mode 100644 index 0000000000..71dd79c408 --- /dev/null +++ b/files/ko/orphaned/web/api/parentnode/children/index.html @@ -0,0 +1,86 @@ +--- +title: ParentNode.children +slug: orphaned/Web/API/ParentNode/children +translation_of: Web/API/ParentNode/children +original_slug: Web/API/ParentNode/children +--- +
{{ APIRef("DOM") }}
+ +

{{domxref("ParentNode")}}의 속성 children은 호출된 요소의 모든 자식 노드의 {{domxref("Element","elements")}}를 담고있는 실시간 {{domxref("HTMLCollection")}}을 반환합니다.

+ +

Syntax 

+ +
var children = node.children;
+ +

Value

+ +

실시간이며, node의 자식 DOM 요소들의 정렬된 컬렉션인 {{ domxref("HTMLCollection") }}. 각 자식 요소를 컬렉션 안에서 접근하기 위해서 {{domxref("HTMLCollection.item", "item()")}} 메소드를 이용하거나 Javascript 배열 스타일의 문법을 사용할 수 있습니다.

+ +

만약 노드가 자식요소를 갖고 있지 않나면, children은 0의 length를 가진 빈 리스트 일 것입니다.

+ +

Example

+ +
var foo = document.getElementById('foo');
+for (var i = 0; i < foo.children.length; i++) {
+    console.log(foo.children[i].tagName);
+}
+
+ +

Polyfill

+ +
// Overwrites native 'children' prototype.
+// Adds Document & DocumentFragment support for IE9 & Safari.
+// Returns array instead of HTMLCollection.
+;(function(constructor) {
+    if (constructor &&
+        constructor.prototype &&
+        constructor.prototype.children == null) {
+        Object.defineProperty(constructor.prototype, 'children', {
+            get: function() {
+                var i = 0, node, nodes = this.childNodes, children = [];
+                while (node = nodes[i++]) {
+                    if (node.nodeType === 1) {
+                        children.push(node);
+                    }
+                }
+                return children;
+            }
+        });
+    }
+})(window.Node || window.Element);
+
+ +

Specification

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Initial definition.
+ +

Browser compatibility

+ + + +

{{Compat("api.ParentNode.children")}}

+ +

See also

+ + diff --git a/files/ko/web/api/parentnode/children/index.html b/files/ko/web/api/parentnode/children/index.html deleted file mode 100644 index 264fb25956..0000000000 --- a/files/ko/web/api/parentnode/children/index.html +++ /dev/null @@ -1,85 +0,0 @@ ---- -title: ParentNode.children -slug: Web/API/ParentNode/children -translation_of: Web/API/ParentNode/children ---- -
{{ APIRef("DOM") }}
- -

{{domxref("ParentNode")}}의 속성 children은 호출된 요소의 모든 자식 노드의 {{domxref("Element","elements")}}를 담고있는 실시간 {{domxref("HTMLCollection")}}을 반환합니다.

- -

Syntax 

- -
var children = node.children;
- -

Value

- -

실시간이며, node의 자식 DOM 요소들의 정렬된 컬렉션인 {{ domxref("HTMLCollection") }}. 각 자식 요소를 컬렉션 안에서 접근하기 위해서 {{domxref("HTMLCollection.item", "item()")}} 메소드를 이용하거나 Javascript 배열 스타일의 문법을 사용할 수 있습니다.

- -

만약 노드가 자식요소를 갖고 있지 않나면, children은 0의 length를 가진 빈 리스트 일 것입니다.

- -

Example

- -
var foo = document.getElementById('foo');
-for (var i = 0; i < foo.children.length; i++) {
-    console.log(foo.children[i].tagName);
-}
-
- -

Polyfill

- -
// Overwrites native 'children' prototype.
-// Adds Document & DocumentFragment support for IE9 & Safari.
-// Returns array instead of HTMLCollection.
-;(function(constructor) {
-    if (constructor &&
-        constructor.prototype &&
-        constructor.prototype.children == null) {
-        Object.defineProperty(constructor.prototype, 'children', {
-            get: function() {
-                var i = 0, node, nodes = this.childNodes, children = [];
-                while (node = nodes[i++]) {
-                    if (node.nodeType === 1) {
-                        children.push(node);
-                    }
-                }
-                return children;
-            }
-        });
-    }
-})(window.Node || window.Element);
-
- -

Specification

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Initial definition.
- -

Browser compatibility

- - - -

{{Compat("api.ParentNode.children")}}

- -

See also

- - diff --git a/files/pl/_redirects.txt b/files/pl/_redirects.txt index 25b1412960..37438cfa54 100644 --- a/files/pl/_redirects.txt +++ b/files/pl/_redirects.txt @@ -1,3 +1,8 @@ +# DO NOT EDIT THIS FILE MANUALLY. +# Use the CLI instead: +# +# yarn content add-redirect +# # FROM-URL TO-URL /pl/docs/AJAX /pl/docs/Web/Guide/AJAX /pl/docs/AJAX/Na_początek /pl/docs/Web/Guide/AJAX/Getting_Started @@ -2006,6 +2011,7 @@ /pl/docs/Web/API/Node/namespaceURI /pl/docs/Web/API/Element/namespaceURI /pl/docs/Web/API/Node/prefix /pl/docs/Web/API/Element/prefix /pl/docs/Web/API/ParentNode/childElementCount /pl/docs/Web/API/Element/childElementCount +/pl/docs/Web/API/ParentNode/children /pl/docs/orphaned/Web/API/ParentNode/children /pl/docs/Web/API/Storage /pl/docs/Web/API/Web_Storage_API /pl/docs/Web/API/Stylesheet /pl/docs/Web/API/CSSStyleSheet /pl/docs/Web/API/Stylesheet/cssRules /pl/docs/Web/API/CSSRuleList diff --git a/files/pl/_wikihistory.json b/files/pl/_wikihistory.json index 1975db680c..fb9326f5e5 100644 --- a/files/pl/_wikihistory.json +++ b/files/pl/_wikihistory.json @@ -2165,12 +2165,6 @@ "Web/API/ParentNode": { "modified": "2020-10-15T22:19:13.921Z" }, - "Web/API/ParentNode/children": { - "modified": "2020-10-29T07:01:42.075Z", - "contributors": [ - "dk333" - ] - }, "Web/API/Push_API": { "modified": "2019-03-23T22:08:29.784Z", "contributors": [ @@ -11745,5 +11739,11 @@ "kaka0204", "SurmaAa" ] + }, + "orphaned/Web/API/ParentNode/children": { + "modified": "2020-10-29T07:01:42.075Z", + "contributors": [ + "dk333" + ] } } \ No newline at end of file diff --git a/files/pl/orphaned/web/api/parentnode/children/index.html b/files/pl/orphaned/web/api/parentnode/children/index.html new file mode 100644 index 0000000000..f7f80ac704 --- /dev/null +++ b/files/pl/orphaned/web/api/parentnode/children/index.html @@ -0,0 +1,97 @@ +--- +title: ParentNode.children +slug: orphaned/Web/API/ParentNode/children +tags: + - API + - Dzieci + - Dziecko + - Kolekcja HTML + - Potomek + - Potomkowie + - Właściwość + - węzeł +translation_of: Web/API/ParentNode/children +original_slug: Web/API/ParentNode/children +--- +
{{ APIRef("DOM") }}
+ +

The {{domxref("ParentNode")}} właściwość children jest właściwością tylko do odczytu (read-only) która zwraca aktualną kolekcję {{domxref("HTMLCollection")}} zawierającą wszystkie elementy podrzędne {{domxref("Element", "elements")}} węzła, na którym został wywołany.

+ +

Składnia

+ +
let children = node.children;
+ +

Value

+ +

{{ domxref("HTMLCollection") }} aktualna, uporządkowana kolekcja elementów DOM które są potomkami node. Możesz otrzymać pojedynczych potomków kolekcji używając albo {{domxref("HTMLCollection.item()", "item()")}} metody na kolekcji, albo używając notacji w stylu tablicowym języka JavaScript.

+ +

Jeżeli element node nie ma potomków, wtedy children jest pustą listą o długości 0 (length of 0).

+ +

Przykład

+ +
const foo = document.getElementById('foo');
+for (let i = 0; i < foo.children.length; i++) {
+  console.log(foo.children[i].tagName);
+}
+
+ +

Uzupełnienie

+ +
// Nadpisuje natywny prototyp 'children'.
+// Dodaje Document & DocumentFragment wsparcie dla IE9 & Safari.
+// Zwraca tablicę zamiast HTMLCollection.
+;(function(constructor) {
+  if (constructor &&
+    constructor.prototype &&
+    constructor.prototype.children == null) {
+    Object.defineProperty(constructor.prototype, 'children', {
+      get: function() {
+        let i = 0, node, nodes = this.childNodes, children = [];
+        while (node = nodes[i++]) {
+          if (node.nodeType === 1) {
+            children.push(node);
+          }
+        }
+        return children;
+      }
+    });
+  }
+})(window.Node || window.Element);
+
+ +

Specyfikacja

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Wstępna definicja
+ +

Zgodność z przeglądarkami

+ + + +

{{Compat("api.ParentNode.children")}}

+ +

Zobacz także

+ +
    +
  • Interfejsy {{domxref("ParentNode")}} {{domxref("ChildNode")}}.
  • +
  • +
    Typy obiektów implementujące ten interfejs: {{domxref("Document")}}, {{domxref("Element")}}, {{domxref("DocumentFragment")}}.
    +
  • +
  • +
    {{domxref("Node.childNodes")}}
    +
  • +
diff --git a/files/pl/web/api/parentnode/children/index.html b/files/pl/web/api/parentnode/children/index.html deleted file mode 100644 index 1d8576d64b..0000000000 --- a/files/pl/web/api/parentnode/children/index.html +++ /dev/null @@ -1,96 +0,0 @@ ---- -title: ParentNode.children -slug: Web/API/ParentNode/children -tags: - - API - - Dzieci - - Dziecko - - Kolekcja HTML - - Potomek - - Potomkowie - - Właściwość - - węzeł -translation_of: Web/API/ParentNode/children ---- -
{{ APIRef("DOM") }}
- -

The {{domxref("ParentNode")}} właściwość children jest właściwością tylko do odczytu (read-only) która zwraca aktualną kolekcję {{domxref("HTMLCollection")}} zawierającą wszystkie elementy podrzędne {{domxref("Element", "elements")}} węzła, na którym został wywołany.

- -

Składnia

- -
let children = node.children;
- -

Value

- -

{{ domxref("HTMLCollection") }} aktualna, uporządkowana kolekcja elementów DOM które są potomkami node. Możesz otrzymać pojedynczych potomków kolekcji używając albo {{domxref("HTMLCollection.item()", "item()")}} metody na kolekcji, albo używając notacji w stylu tablicowym języka JavaScript.

- -

Jeżeli element node nie ma potomków, wtedy children jest pustą listą o długości 0 (length of 0).

- -

Przykład

- -
const foo = document.getElementById('foo');
-for (let i = 0; i < foo.children.length; i++) {
-  console.log(foo.children[i].tagName);
-}
-
- -

Uzupełnienie

- -
// Nadpisuje natywny prototyp 'children'.
-// Dodaje Document & DocumentFragment wsparcie dla IE9 & Safari.
-// Zwraca tablicę zamiast HTMLCollection.
-;(function(constructor) {
-  if (constructor &&
-    constructor.prototype &&
-    constructor.prototype.children == null) {
-    Object.defineProperty(constructor.prototype, 'children', {
-      get: function() {
-        let i = 0, node, nodes = this.childNodes, children = [];
-        while (node = nodes[i++]) {
-          if (node.nodeType === 1) {
-            children.push(node);
-          }
-        }
-        return children;
-      }
-    });
-  }
-})(window.Node || window.Element);
-
- -

Specyfikacja

- - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Wstępna definicja
- -

Zgodność z przeglądarkami

- - - -

{{Compat("api.ParentNode.children")}}

- -

Zobacz także

- -
    -
  • Interfejsy {{domxref("ParentNode")}} {{domxref("ChildNode")}}.
  • -
  • -
    Typy obiektów implementujące ten interfejs: {{domxref("Document")}}, {{domxref("Element")}}, {{domxref("DocumentFragment")}}.
    -
  • -
  • -
    {{domxref("Node.childNodes")}}
    -
  • -
diff --git a/files/pt-br/_redirects.txt b/files/pt-br/_redirects.txt index 43c76308bd..dc5ef533e0 100644 --- a/files/pt-br/_redirects.txt +++ b/files/pt-br/_redirects.txt @@ -592,6 +592,7 @@ /pt-BR/docs/Web/API/Node/Entendendo_o_uso_do_método_AppendChild-javascript /pt-BR/docs/orphaned/Web/API/Node/Entendendo_o_uso_do_método_AppendChild-javascript /pt-BR/docs/Web/API/Node/innerText /pt-BR/docs/Web/API/HTMLElement/innerText /pt-BR/docs/Web/API/ParentNode/childElementCount /pt-BR/docs/Web/API/Element/childElementCount +/pt-BR/docs/Web/API/ParentNode/children /pt-BR/docs/orphaned/Web/API/ParentNode/children /pt-BR/docs/Web/API/Position /pt-BR/docs/Web/API/GeolocationPosition /pt-BR/docs/Web/API/Position/coords /pt-BR/docs/Web/API/GeolocationPosition/coords /pt-BR/docs/Web/API/PositionError /pt-BR/docs/Web/API/GeolocationPositionError diff --git a/files/pt-br/_wikihistory.json b/files/pt-br/_wikihistory.json index f0db1f7010..dd23a42b41 100644 --- a/files/pt-br/_wikihistory.json +++ b/files/pt-br/_wikihistory.json @@ -3341,12 +3341,6 @@ "jpmedley" ] }, - "Web/API/ParentNode/children": { - "modified": "2019-03-23T22:19:42.340Z", - "contributors": [ - "rafaelcavalcante" - ] - }, "Web/API/ParentNode/querySelector": { "modified": "2020-10-15T22:23:27.840Z", "contributors": [ @@ -17367,5 +17361,11 @@ "contributors": [ "diegolw" ] + }, + "orphaned/Web/API/ParentNode/children": { + "modified": "2019-03-23T22:19:42.340Z", + "contributors": [ + "rafaelcavalcante" + ] } } \ No newline at end of file diff --git a/files/pt-br/orphaned/web/api/parentnode/children/index.html b/files/pt-br/orphaned/web/api/parentnode/children/index.html new file mode 100644 index 0000000000..64c0f40d68 --- /dev/null +++ b/files/pt-br/orphaned/web/api/parentnode/children/index.html @@ -0,0 +1,132 @@ +--- +title: ParentNode.children +slug: orphaned/Web/API/ParentNode/children +translation_of: Web/API/ParentNode/children +original_slug: Web/API/ParentNode/children +--- +

{{ APIRef("DOM") }}

+ +

Node.children é uma propriedade exclusivamente de leitura que retorna uma coleção {{domxref("HTMLCollection")}} dos elementos filhos do .

+ +

Sintaxe

+ +
var elList = elementNodeReference.children; 
+ +

elList é uma {{ domxref("HTMLCollection") }}, que é uma lista ordenada de uma coleção de elementos do DOM que são filhos do elementNodeReference. Se não existir nenhum elemento filho, o elList não terá elemento algum sua propriedade length será 0.

+ +

Exemplo

+ +
// pEl é uma referência à um elemento <p>
+var elementChildren = pEl.children;
+for (var i = 0; i < elementChildren.length; i++) {
+    console.log(elementChildren[i].tagName);
+    // NOTE: elementChildren é uma lista viva, adicionar ou remover filhos de pEl
+    // mudará instantaneamente o valor retornado por elementChildren
+}
+
+ +

Especificação

+ + + + + + + + + + + + + + +
EspecificaçãoStatusComment
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Definição inicial.
+ +

Compatibilidade de navegadores

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerEdgeOperaSafari
Basic support (on {{domxref("Element")}})1.0{{CompatGeckoDesktop("1.9.1")}}9.0 [1]38.010.04.0
Support on {{domxref("Document")}} and {{domxref("DocumentFragment")}} {{experimental_inline}}29.0{{CompatGeckoDesktop("25.0")}}{{CompatNo}}{{CompatNo}}16.0{{CompatNo}}
Support on {{domxref("SVGElement")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (on {{domxref("Element")}}){{ CompatVersionUnknown() }}{{CompatGeckoMobile("1.9.1")}}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
Support on {{domxref("Document")}} and {{domxref("DocumentFragment")}} {{experimental_inline}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25.0")}}{{CompatNo}}16.0{{CompatNo}}
+
+ +

[1] Internet Explorer 6, 7 e 8 suportaram esse método, mas erroneamente incluiam nós de {{domxref("Comment")}}.

+ +

See also

+ +
    +
  • As interfaces de {{domxref("ParentNode")}} e {{domxref("ChildNode")}}.
  • +
  • +
    Tipos de objetos implementando esta interface: {{domxref("Document")}}, {{domxref("Element")}}, e {{domxref("DocumentFragment")}}.
    +
  • +
diff --git a/files/pt-br/web/api/parentnode/children/index.html b/files/pt-br/web/api/parentnode/children/index.html deleted file mode 100644 index 755cff62a5..0000000000 --- a/files/pt-br/web/api/parentnode/children/index.html +++ /dev/null @@ -1,131 +0,0 @@ ---- -title: ParentNode.children -slug: Web/API/ParentNode/children -translation_of: Web/API/ParentNode/children ---- -

{{ APIRef("DOM") }}

- -

Node.children é uma propriedade exclusivamente de leitura que retorna uma coleção {{domxref("HTMLCollection")}} dos elementos filhos do .

- -

Sintaxe

- -
var elList = elementNodeReference.children; 
- -

elList é uma {{ domxref("HTMLCollection") }}, que é uma lista ordenada de uma coleção de elementos do DOM que são filhos do elementNodeReference. Se não existir nenhum elemento filho, o elList não terá elemento algum sua propriedade length será 0.

- -

Exemplo

- -
// pEl é uma referência à um elemento <p>
-var elementChildren = pEl.children;
-for (var i = 0; i < elementChildren.length; i++) {
-    console.log(elementChildren[i].tagName);
-    // NOTE: elementChildren é uma lista viva, adicionar ou remover filhos de pEl
-    // mudará instantaneamente o valor retornado por elementChildren
-}
-
- -

Especificação

- - - - - - - - - - - - - - -
EspecificaçãoStatusComment
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Definição inicial.
- -

Compatibilidade de navegadores

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerEdgeOperaSafari
Basic support (on {{domxref("Element")}})1.0{{CompatGeckoDesktop("1.9.1")}}9.0 [1]38.010.04.0
Support on {{domxref("Document")}} and {{domxref("DocumentFragment")}} {{experimental_inline}}29.0{{CompatGeckoDesktop("25.0")}}{{CompatNo}}{{CompatNo}}16.0{{CompatNo}}
Support on {{domxref("SVGElement")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (on {{domxref("Element")}}){{ CompatVersionUnknown() }}{{CompatGeckoMobile("1.9.1")}}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
Support on {{domxref("Document")}} and {{domxref("DocumentFragment")}} {{experimental_inline}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25.0")}}{{CompatNo}}16.0{{CompatNo}}
-
- -

[1] Internet Explorer 6, 7 e 8 suportaram esse método, mas erroneamente incluiam nós de {{domxref("Comment")}}.

- -

See also

- -
    -
  • As interfaces de {{domxref("ParentNode")}} e {{domxref("ChildNode")}}.
  • -
  • -
    Tipos de objetos implementando esta interface: {{domxref("Document")}}, {{domxref("Element")}}, e {{domxref("DocumentFragment")}}.
    -
  • -
diff --git a/files/ru/_redirects.txt b/files/ru/_redirects.txt index ca9db1d561..1ccfb65842 100644 --- a/files/ru/_redirects.txt +++ b/files/ru/_redirects.txt @@ -454,6 +454,7 @@ /ru/docs/Web/API/NonDocumentTypeChildNode/nextElementSibling /ru/docs/Web/API/Element/nextElementSibling /ru/docs/Web/API/NonDocumentTypeChildNode/previousElementSibling /ru/docs/Web/API/Element/previousElementSibling /ru/docs/Web/API/ParentNode/childElementCount /ru/docs/Web/API/Element/childElementCount +/ru/docs/Web/API/ParentNode/children /ru/docs/orphaned/Web/API/ParentNode/children /ru/docs/Web/API/PositionError /ru/docs/Web/API/GeolocationPositionError /ru/docs/Web/API/Push_API/Using_the_Push_API /ru/docs/conflicting/Web/API/Push_API /ru/docs/Web/API/RandomSource /ru/docs/conflicting/Web/API/Crypto/getRandomValues diff --git a/files/ru/_wikihistory.json b/files/ru/_wikihistory.json index 9f32b07fd5..c6e56b4a6c 100644 --- a/files/ru/_wikihistory.json +++ b/files/ru/_wikihistory.json @@ -6828,16 +6828,6 @@ "madebydima" ] }, - "Web/API/ParentNode/children": { - "modified": "2019-09-25T14:03:42.278Z", - "contributors": [ - "ellizii", - "Yialo", - "RblSb", - "evgkit", - "In4in" - ] - }, "Web/API/ParentNode/firstElementChild": { "modified": "2019-08-28T05:08:54.083Z", "contributors": [ @@ -25988,5 +25978,15 @@ "undgrnd", "nechehin" ] + }, + "orphaned/Web/API/ParentNode/children": { + "modified": "2019-09-25T14:03:42.278Z", + "contributors": [ + "ellizii", + "Yialo", + "RblSb", + "evgkit", + "In4in" + ] } } \ No newline at end of file diff --git a/files/ru/orphaned/web/api/parentnode/children/index.html b/files/ru/orphaned/web/api/parentnode/children/index.html new file mode 100644 index 0000000000..b380d55fde --- /dev/null +++ b/files/ru/orphaned/web/api/parentnode/children/index.html @@ -0,0 +1,144 @@ +--- +title: Node.children +slug: orphaned/Web/API/ParentNode/children +tags: + - API + - DOM + - ParentNode + - Property + - Reference +translation_of: Web/API/ParentNode/children +original_slug: Web/API/ParentNode/children +--- +

{{ APIRef("DOM") }}

+ +

Описание

+ +

Свойство children {{domxref("ParentNode")}} является свойством только для чтения, которое возвращает {{domxref("HTMLCollection")}}, содержащее все дочерние {{domxref("Element", "elements")}} узла, на котором он был вызван.

+ +

Синтаксис

+ +
var elList = elementNodeReference.children; 
+ +

В результате, elList - живая коллекция, состоящая из дочерних элементов узла elementNodeReference, и стоит подметить, что если у узла детей нет, она будет пустой. Определить это можно, обратившись к свойству length, которое содержит в себе количество элементов в коллекции.

+ +

Пример

+ +
<ul>
+   <li>1 пункт</li>
+   <li>2 пункт</li>
+</ul>
+
+<script type="text/javascript">
+
+   var elementChildrens = document.querySelector("ul").children;
+   for (var i=0, child; child=elementChildrens[i]; i++) {
+        // elementChildrens - коллекция детей списка
+        // child - последовательно, каждый из элементов elementChildrens
+        alert(child.innerHTML);
+   }
+
+</script>
+
+
+ +

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

+ + + + + + + + + + + + + + +
СпецификацияСтатусКомментарий
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Начальное определение.
+ +

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

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ОсобенностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка {{domxref("Element")}}1.0{{CompatGeckoDesktop("1.9.1")}}9.0 [1]10.04.0
+

Поддержка {{domxref("Document")}} и {{domxref("DocumentFragment")}} {{experimental_inline}}

+
29.0{{CompatGeckoDesktop("25.0")}}{{CompatNo}}16.0{{CompatNo}}
Поддержка {{domxref("SVGElement")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatUnknown}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
ОсобенностьAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка {{domxref("Element")}}{{ CompatVersionUnknown() }}{{CompatGeckoMobile("1.9.1")}}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
Поддержка {{domxref("Document")}} и {{domxref("DocumentFragment")}} {{experimental_inline}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25.0")}}{{CompatNo}}16.0{{CompatNo}}
+
+ +

Internet Explorer 6, 7 и 8 поддерживают данное свойство, но ошибочно включают в коллекцию комментарии ({{domxref("Comment")}}) в HTML-коде.

+ +

Смотрите также

+ +
    +
  • Свойства {{domxref("ParentNode")}} и {{domxref("ChildNode")}}.
  • +
diff --git a/files/ru/web/api/parentnode/children/index.html b/files/ru/web/api/parentnode/children/index.html deleted file mode 100644 index bc61091552..0000000000 --- a/files/ru/web/api/parentnode/children/index.html +++ /dev/null @@ -1,143 +0,0 @@ ---- -title: Node.children -slug: Web/API/ParentNode/children -tags: - - API - - DOM - - ParentNode - - Property - - Reference -translation_of: Web/API/ParentNode/children ---- -

{{ APIRef("DOM") }}

- -

Описание

- -

Свойство children {{domxref("ParentNode")}} является свойством только для чтения, которое возвращает {{domxref("HTMLCollection")}}, содержащее все дочерние {{domxref("Element", "elements")}} узла, на котором он был вызван.

- -

Синтаксис

- -
var elList = elementNodeReference.children; 
- -

В результате, elList - живая коллекция, состоящая из дочерних элементов узла elementNodeReference, и стоит подметить, что если у узла детей нет, она будет пустой. Определить это можно, обратившись к свойству length, которое содержит в себе количество элементов в коллекции.

- -

Пример

- -
<ul>
-   <li>1 пункт</li>
-   <li>2 пункт</li>
-</ul>
-
-<script type="text/javascript">
-
-   var elementChildrens = document.querySelector("ul").children;
-   for (var i=0, child; child=elementChildrens[i]; i++) {
-        // elementChildrens - коллекция детей списка
-        // child - последовательно, каждый из элементов elementChildrens
-        alert(child.innerHTML);
-   }
-
-</script>
-
-
- -

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

- - - - - - - - - - - - - - -
СпецификацияСтатусКомментарий
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Начальное определение.
- -

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

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ОсобенностьChromeFirefox (Gecko)Internet ExplorerOperaSafari
Базовая поддержка {{domxref("Element")}}1.0{{CompatGeckoDesktop("1.9.1")}}9.0 [1]10.04.0
-

Поддержка {{domxref("Document")}} и {{domxref("DocumentFragment")}} {{experimental_inline}}

-
29.0{{CompatGeckoDesktop("25.0")}}{{CompatNo}}16.0{{CompatNo}}
Поддержка {{domxref("SVGElement")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatUnknown}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
ОсобенностьAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Базовая поддержка {{domxref("Element")}}{{ CompatVersionUnknown() }}{{CompatGeckoMobile("1.9.1")}}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
Поддержка {{domxref("Document")}} и {{domxref("DocumentFragment")}} {{experimental_inline}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25.0")}}{{CompatNo}}16.0{{CompatNo}}
-
- -

Internet Explorer 6, 7 и 8 поддерживают данное свойство, но ошибочно включают в коллекцию комментарии ({{domxref("Comment")}}) в HTML-коде.

- -

Смотрите также

- -
    -
  • Свойства {{domxref("ParentNode")}} и {{domxref("ChildNode")}}.
  • -
diff --git a/files/zh-cn/_redirects.txt b/files/zh-cn/_redirects.txt index c892700c59..e56379facf 100644 --- a/files/zh-cn/_redirects.txt +++ b/files/zh-cn/_redirects.txt @@ -268,7 +268,7 @@ /zh-CN/docs/DOM/DOMString /zh-CN/docs/Web/API/DOMString /zh-CN/docs/DOM/Document.querySelectorAll /zh-CN/docs/Web/API/Document/querySelectorAll /zh-CN/docs/DOM/Document.scripts /zh-CN/docs/Web/API/Document/scripts -/zh-CN/docs/DOM/Element.children /zh-CN/docs/Web/API/ParentNode/children +/zh-CN/docs/DOM/Element.children /zh-CN/docs/orphaned/Web/API/ParentNode/children /zh-CN/docs/DOM/Element.firstElementChild /zh-CN/docs/Web/API/ParentNode/firstElementChild /zh-CN/docs/DOM/Element.lastElementChild /zh-CN/docs/Web/API/ParentNode/lastElementChild /zh-CN/docs/DOM/Element.nextElementSibling /zh-CN/docs/Web/API/Element/nextElementSibling @@ -1725,10 +1725,11 @@ /zh-CN/docs/Web/API/NonDocumentTypeChildNode/previousElementSibling /zh-CN/docs/Web/API/Element/previousElementSibling /zh-CN/docs/Web/API/OfflineAudioContext/complete /zh-CN/docs/Web/API/OfflineAudioContext/complete_event /zh-CN/docs/Web/API/ParentNode.childElementCount /zh-CN/docs/Web/API/Element/childElementCount -/zh-CN/docs/Web/API/ParentNode.children /zh-CN/docs/Web/API/ParentNode/children +/zh-CN/docs/Web/API/ParentNode.children /zh-CN/docs/orphaned/Web/API/ParentNode/children /zh-CN/docs/Web/API/ParentNode.firstElementChild /zh-CN/docs/Web/API/ParentNode/firstElementChild /zh-CN/docs/Web/API/ParentNode.lastElementChild /zh-CN/docs/Web/API/ParentNode/lastElementChild /zh-CN/docs/Web/API/ParentNode/childElementCount /zh-CN/docs/Web/API/Element/childElementCount +/zh-CN/docs/Web/API/ParentNode/children /zh-CN/docs/orphaned/Web/API/ParentNode/children /zh-CN/docs/Web/API/Performance.now() /zh-CN/docs/Web/API/Performance/now /zh-CN/docs/Web/API/Performance/内存 /zh-CN/docs/Web/API/Performance/memory /zh-CN/docs/Web/API/Position /zh-CN/docs/Web/API/GeolocationPosition diff --git a/files/zh-cn/_wikihistory.json b/files/zh-cn/_wikihistory.json index 9f0050198c..16eb345f2b 100644 --- a/files/zh-cn/_wikihistory.json +++ b/files/zh-cn/_wikihistory.json @@ -16794,17 +16794,6 @@ "ziyunfei" ] }, - "Web/API/ParentNode/children": { - "modified": "2019-10-05T16:42:46.088Z", - "contributors": [ - "xiaoxiyao", - "xgqfrms-GitHub", - "teoli", - "khalid32", - "ziyunfei", - "AlexChao" - ] - }, "Web/API/ParentNode/firstElementChild": { "modified": "2020-10-15T21:06:48.165Z", "contributors": [ @@ -50798,5 +50787,16 @@ "peonyriver", "FredWe" ] + }, + "orphaned/Web/API/ParentNode/children": { + "modified": "2019-10-05T16:42:46.088Z", + "contributors": [ + "xiaoxiyao", + "xgqfrms-GitHub", + "teoli", + "khalid32", + "ziyunfei", + "AlexChao" + ] } } \ No newline at end of file diff --git a/files/zh-cn/orphaned/web/api/parentnode/children/index.html b/files/zh-cn/orphaned/web/api/parentnode/children/index.html new file mode 100644 index 0000000000..70a02ddcca --- /dev/null +++ b/files/zh-cn/orphaned/web/api/parentnode/children/index.html @@ -0,0 +1,118 @@ +--- +title: ParentNode.children +slug: orphaned/Web/API/ParentNode/children +tags: + - Property +translation_of: Web/API/ParentNode/children +original_slug: Web/API/ParentNode/children +--- +

{{ APIRef("DOM") }}

+ +

ParentNode.children 是一个只读属性,返回 一个Node的子{{domxref("Element","elements")}} ,是一个动态更新的 {{domxref("HTMLCollection")}}。

+ +

语法

+ +
var children = node.children;
+ +
var elList = elementNodeReference.children;
+
+ +

备注

+ +

children 属性为只读属性,对象类型为 {{ domxref("HTMLCollection") }},你可以使用 elementNodeReference.children[1].nodeName 来获取某个子元素的标签名称。

+ +

例子

+ +
// parg是一个指向<p>元素的对象引用
+if (parg.childElementCount)
+// 检查这个<p>元素是否有子元素
+// 译者注:childElementCount有兼容性问题
+ {
+   var children = parg.children;
+   for (var i = 0; i < children.length; i++)
+   {
+   // 通过children[i]来获取每个子元素
+   // 注意:List是一个live的HTMLCollection对象,在这里添加或删除parg的子元素节点,都会立即改变List的值.
+   };
+ };
+
+ +

规范

+ +

 

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Initial definition.
+ +

浏览器兼容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support13.59 (IE6-8 incl commend nodes)104
+
+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
+
+ +

[1] Internet Explorer 6 - 8 支持该属性,但是可能会错误地包含注释 {{domxref("Comment")}} 节点。

+ +

相关链接

+ +
    +
  • The {{domxref("ParentNode")}} and {{domxref("ChildNode")}} pure interfaces.
  • +
  • +
    Object types implementing this pure interface: {{domxref("Document")}}, {{domxref("Element")}}, and {{domxref("DocumentFragment")}}.
    +
  • +
diff --git a/files/zh-cn/web/api/parentnode/children/index.html b/files/zh-cn/web/api/parentnode/children/index.html deleted file mode 100644 index 35419a52b6..0000000000 --- a/files/zh-cn/web/api/parentnode/children/index.html +++ /dev/null @@ -1,117 +0,0 @@ ---- -title: ParentNode.children -slug: Web/API/ParentNode/children -tags: - - Property -translation_of: Web/API/ParentNode/children ---- -

{{ APIRef("DOM") }}

- -

ParentNode.children 是一个只读属性,返回 一个Node的子{{domxref("Element","elements")}} ,是一个动态更新的 {{domxref("HTMLCollection")}}。

- -

语法

- -
var children = node.children;
- -
var elList = elementNodeReference.children;
-
- -

备注

- -

children 属性为只读属性,对象类型为 {{ domxref("HTMLCollection") }},你可以使用 elementNodeReference.children[1].nodeName 来获取某个子元素的标签名称。

- -

例子

- -
// parg是一个指向<p>元素的对象引用
-if (parg.childElementCount)
-// 检查这个<p>元素是否有子元素
-// 译者注:childElementCount有兼容性问题
- {
-   var children = parg.children;
-   for (var i = 0; i < children.length; i++)
-   {
-   // 通过children[i]来获取每个子元素
-   // 注意:List是一个live的HTMLCollection对象,在这里添加或删除parg的子元素节点,都会立即改变List的值.
-   };
- };
-
- -

规范

- -

 

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Initial definition.
- -

浏览器兼容性

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support13.59 (IE6-8 incl commend nodes)104
-
- -
- - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
-
- -

[1] Internet Explorer 6 - 8 支持该属性,但是可能会错误地包含注释 {{domxref("Comment")}} 节点。

- -

相关链接

- -
    -
  • The {{domxref("ParentNode")}} and {{domxref("ChildNode")}} pure interfaces.
  • -
  • -
    Object types implementing this pure interface: {{domxref("Document")}}, {{domxref("Element")}}, and {{domxref("DocumentFragment")}}.
    -
  • -
diff --git a/files/zh-tw/_redirects.txt b/files/zh-tw/_redirects.txt index 580f746e41..24c794b2b8 100644 --- a/files/zh-tw/_redirects.txt +++ b/files/zh-tw/_redirects.txt @@ -576,6 +576,7 @@ /zh-TW/docs/Web/API/HTMLElement/style /zh-TW/docs/Web/API/ElementCSSInlineStyle/style /zh-TW/docs/Web/API/Node/innerText /zh-TW/docs/Web/API/HTMLElement/innerText /zh-TW/docs/Web/API/NonDocumentTypeChildNode /zh-TW/docs/conflicting/Web/API/Element +/zh-TW/docs/Web/API/ParentNode/children /zh-TW/docs/orphaned/Web/API/ParentNode/children /zh-TW/docs/Web/API/Performance.timing /zh-TW/docs/Web/API/Performance/timing /zh-TW/docs/Web/API/Position /zh-TW/docs/Web/API/GeolocationPosition /zh-TW/docs/Web/API/Position/coords /zh-TW/docs/Web/API/GeolocationPosition/coords diff --git a/files/zh-tw/_wikihistory.json b/files/zh-tw/_wikihistory.json index 6cfe713ced..f702d4e4df 100644 --- a/files/zh-tw/_wikihistory.json +++ b/files/zh-tw/_wikihistory.json @@ -4233,12 +4233,6 @@ "jackblackevo" ] }, - "Web/API/ParentNode/children": { - "modified": "2019-03-23T22:12:04.488Z", - "contributors": [ - "jackblackevo" - ] - }, "Web/API/ParentNode/firstElementChild": { "modified": "2020-10-15T22:25:38.862Z", "contributors": [ @@ -9152,5 +9146,11 @@ "contributors": [ "jackblackevo" ] + }, + "orphaned/Web/API/ParentNode/children": { + "modified": "2019-03-23T22:12:04.488Z", + "contributors": [ + "jackblackevo" + ] } } \ No newline at end of file diff --git a/files/zh-tw/orphaned/web/api/parentnode/children/index.html b/files/zh-tw/orphaned/web/api/parentnode/children/index.html new file mode 100644 index 0000000000..4ec1f5a90b --- /dev/null +++ b/files/zh-tw/orphaned/web/api/parentnode/children/index.html @@ -0,0 +1,153 @@ +--- +title: ParentNode.children +slug: orphaned/Web/API/ParentNode/children +translation_of: Web/API/ParentNode/children +original_slug: Web/API/ParentNode/children +--- +

{{ APIRef("DOM") }}

+ +

Node.children 唯讀屬性會回傳一個 Node 之子{{domxref("Element","元素")}}的動態(live){{domxref("HTMLCollection")}}。

+ +

語法

+ +
var children = node.children;
+ +

children 是一個 {{ domxref("HTMLCollection") }},為一個有順序性、由 node 中的 DOM 子元素所組成的集合。假如沒有子元素,則 children 內便不包含任何元素,且 length0

+ +

範例

+ +
var foo = document.getElementById('foo');
+for (var i = 0; i < foo.children.length; i++) {
+    console.log(foo.children[i].tagName);
+}
+
+ +

Polyfill

+ +
// Overwrites native 'children' prototype.
+// Adds Document & DocumentFragment support for IE9 & Safari.
+// Returns array instead of HTMLCollection.
+;(function(constructor) {
+    if (constructor &&
+        constructor.prototype &&
+        constructor.prototype.children == null) {
+        Object.defineProperty(constructor.prototype, 'children', {
+            get: function() {
+                var i = 0, node, nodes = this.childNodes, children = [];
+                while (node = nodes[i++]) {
+                    if (node.nodeType === 1) {
+                        children.push(node);
+                    }
+                }
+                return children;
+            }
+        });
+    }
+})(window.Node || window.Element);
+
+ +

規範

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Initial definition.
+ +

瀏覽器相容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerEdgeOperaSafari
Basic support (on {{domxref("Element")}})1.0{{CompatGeckoDesktop("1.9.1")}}9.0 [1]38.010.04.0
Support on {{domxref("Document")}} and {{domxref("DocumentFragment")}} {{experimental_inline}}29.0{{CompatGeckoDesktop("25.0")}}{{CompatNo}}{{CompatNo}}16.0{{CompatNo}}
Support on {{domxref("SVGElement")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (on {{domxref("Element")}}){{ CompatVersionUnknown() }}{{CompatGeckoMobile("1.9.1")}}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
Support on {{domxref("Document")}} and {{domxref("DocumentFragment")}} {{experimental_inline}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25.0")}}{{CompatNo}}16.0{{CompatNo}}
+
+ +

[1] Internet Explorer 6, 7 and 8 supported it, but erroneously includes {{domxref("Comment")}} nodes.

+ +

參見

+ +
    +
  • The {{domxref("ParentNode")}} and {{domxref("ChildNode")}} interfaces.
  • +
  • +
    Object types implementing this interface: {{domxref("Document")}}, {{domxref("Element")}}, and {{domxref("DocumentFragment")}}.
    +
  • +
diff --git a/files/zh-tw/web/api/parentnode/children/index.html b/files/zh-tw/web/api/parentnode/children/index.html deleted file mode 100644 index f9f6c76115..0000000000 --- a/files/zh-tw/web/api/parentnode/children/index.html +++ /dev/null @@ -1,152 +0,0 @@ ---- -title: ParentNode.children -slug: Web/API/ParentNode/children -translation_of: Web/API/ParentNode/children ---- -

{{ APIRef("DOM") }}

- -

Node.children 唯讀屬性會回傳一個 Node 之子{{domxref("Element","元素")}}的動態(live){{domxref("HTMLCollection")}}。

- -

語法

- -
var children = node.children;
- -

children 是一個 {{ domxref("HTMLCollection") }},為一個有順序性、由 node 中的 DOM 子元素所組成的集合。假如沒有子元素,則 children 內便不包含任何元素,且 length0

- -

範例

- -
var foo = document.getElementById('foo');
-for (var i = 0; i < foo.children.length; i++) {
-    console.log(foo.children[i].tagName);
-}
-
- -

Polyfill

- -
// Overwrites native 'children' prototype.
-// Adds Document & DocumentFragment support for IE9 & Safari.
-// Returns array instead of HTMLCollection.
-;(function(constructor) {
-    if (constructor &&
-        constructor.prototype &&
-        constructor.prototype.children == null) {
-        Object.defineProperty(constructor.prototype, 'children', {
-            get: function() {
-                var i = 0, node, nodes = this.childNodes, children = [];
-                while (node = nodes[i++]) {
-                    if (node.nodeType === 1) {
-                        children.push(node);
-                    }
-                }
-                return children;
-            }
-        });
-    }
-})(window.Node || window.Element);
-
- -

規範

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}{{Spec2('DOM WHATWG')}}Initial definition.
- -

瀏覽器相容性

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerEdgeOperaSafari
Basic support (on {{domxref("Element")}})1.0{{CompatGeckoDesktop("1.9.1")}}9.0 [1]38.010.04.0
Support on {{domxref("Document")}} and {{domxref("DocumentFragment")}} {{experimental_inline}}29.0{{CompatGeckoDesktop("25.0")}}{{CompatNo}}{{CompatNo}}16.0{{CompatNo}}
Support on {{domxref("SVGElement")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatNo}}{{CompatNo}}{{CompatUnknown}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support (on {{domxref("Element")}}){{ CompatVersionUnknown() }}{{CompatGeckoMobile("1.9.1")}}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
Support on {{domxref("Document")}} and {{domxref("DocumentFragment")}} {{experimental_inline}}{{CompatVersionUnknown}}{{CompatGeckoMobile("25.0")}}{{CompatNo}}16.0{{CompatNo}}
-
- -

[1] Internet Explorer 6, 7 and 8 supported it, but erroneously includes {{domxref("Comment")}} nodes.

- -

參見

- -
    -
  • The {{domxref("ParentNode")}} and {{domxref("ChildNode")}} interfaces.
  • -
  • -
    Object types implementing this interface: {{domxref("Document")}}, {{domxref("Element")}}, and {{domxref("DocumentFragment")}}.
    -
  • -
-- cgit v1.2.3-54-g00ecf