aboutsummaryrefslogtreecommitdiff
path: root/files/pl/orphaned/web
diff options
context:
space:
mode:
authorMDN <actions@users.noreply.github.com>2021-04-14 00:11:31 +0000
committerMDN <actions@users.noreply.github.com>2021-04-14 00:11:31 +0000
commitdb26cf86829f9b43d29f18b9bbf197e9e2d55c31 (patch)
tree9e4b1a32107c07b5a6d3d449f9d52f3d645aa87f /files/pl/orphaned/web
parent2a80998020496995b1eb33e0a2ed024f1708535d (diff)
downloadtranslated-content-db26cf86829f9b43d29f18b9bbf197e9e2d55c31.tar.gz
translated-content-db26cf86829f9b43d29f18b9bbf197e9e2d55c31.tar.bz2
translated-content-db26cf86829f9b43d29f18b9bbf197e9e2d55c31.zip
[CRON] sync translated content
Diffstat (limited to 'files/pl/orphaned/web')
-rw-r--r--files/pl/orphaned/web/api/parentnode/children/index.html97
1 files changed, 97 insertions, 0 deletions
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
+---
+<div>{{ APIRef("DOM") }}</div>
+
+<p><span class="seoSummary">The {{domxref("ParentNode")}} właściwość <code><strong>children</strong></code> 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.</span></p>
+
+<h2 id="Składnia">Składnia</h2>
+
+<pre class="syntaxbox notranslate">let <var>children</var> = <var>node</var>.children;</pre>
+
+<h3 id="Value">Value</h3>
+
+<p>{{ domxref("HTMLCollection") }} aktualna, uporządkowana kolekcja elementów DOM które są potomkami <code><var>node</var></code>. 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.</p>
+
+<p>Jeżeli element node nie ma potomków, wtedy <code>children</code> jest pustą listą o długości 0 (<code>length</code> of <code>0)</code>.</p>
+
+<h2 id="Przykład">Przykład</h2>
+
+<pre class="brush: js notranslate">const foo = document.getElementById('foo');
+for (let i = 0; i &lt; foo.children.length; i++) {
+ console.log(foo.children[i].tagName);
+}
+</pre>
+
+<h2 id="Uzupełnienie">Uzupełnienie</h2>
+
+<pre class="brush: js notranslate">// Nadpisuje natywny prototyp 'children'.
+// Dodaje Document &amp; DocumentFragment wsparcie dla IE9 &amp; Safari.
+// Zwraca tablicę zamiast HTMLCollection.
+;(function(constructor) {
+ if (constructor &amp;&amp;
+ constructor.prototype &amp;&amp;
+ 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);
+</pre>
+
+<h2 id="Specyfikacja">Specyfikacja</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('DOM WHATWG', '#dom-parentnode-children', 'ParentNode.children')}}</td>
+ <td>{{Spec2('DOM WHATWG')}}</td>
+ <td>Wstępna definicja</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Zgodność_z_przeglądarkami">Zgodność z przeglądarkami</h2>
+
+<div class="hidden">Tablica zgodności na tej stronie jest generowana z danych strukturalnych. Jeśli chcesz przyczynić się do do tych danych, proszę sprawdź <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> i wyślij nam swoją propozycję (a pull request).</div>
+
+<p>{{Compat("api.ParentNode.children")}}</p>
+
+<h2 id="Zobacz_także">Zobacz także</h2>
+
+<ul>
+ <li>Interfejsy {{domxref("ParentNode")}} {{domxref("ChildNode")}}.</li>
+ <li>
+ <div class="syntaxbox">Typy obiektów implementujące ten interfejs: {{domxref("Document")}}, {{domxref("Element")}}, {{domxref("DocumentFragment")}}.</div>
+ </li>
+ <li>
+ <div class="syntaxbox">{{domxref("Node.childNodes")}}</div>
+ </li>
+</ul>