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/pl/web/api/parentnode/children/index.html | 96 ------------------------- 1 file changed, 96 deletions(-) delete mode 100644 files/pl/web/api/parentnode/children/index.html (limited to 'files/pl/web') 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

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