aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files/ja/web/api/document/childelementcount/index.html46
-rw-r--r--files/ja/web/api/documentfragment/childelementcount/index.html48
-rw-r--r--files/ja/web/api/element/childelementcount/index.html4
3 files changed, 96 insertions, 2 deletions
diff --git a/files/ja/web/api/document/childelementcount/index.html b/files/ja/web/api/document/childelementcount/index.html
new file mode 100644
index 0000000000..fcd6244dd0
--- /dev/null
+++ b/files/ja/web/api/document/childelementcount/index.html
@@ -0,0 +1,46 @@
+---
+title: Document.childElementCount
+slug: Web/API/Document/childElementCount
+tags:
+ - API
+ - DOM
+ - Property
+ - Reference
+browser-compat: api.Document.childElementCount
+translation_of: Web/API/Document/childElementCount
+---
+<div>{{ APIRef("DOM") }}</div>
+
+<p><code><strong>Document.childElementCount</strong></code> は読み取り専用のプロパティで、文書の子要素の数を返します。</p>
+
+<p>特定の要素の子要素の数を取得する場合は、 {{domxref("Element.childElementCount")}} を参照してください。</p>
+
+<h2 id="Syntax">構文</h2>
+
+<pre class="brush: js"><em>document</em>.childElementCount;
+</pre>
+
+<h2 id="Example">例</h2>
+
+<pre class="brush:js">
+document.children;
+// HTMLCollection で、ふつうは &lt;html&gt; 要素をこの文書の唯一の子として含んでいる
+
+document.childElementCount;
+// 1
+</pre>
+
+<h2 id="Specifications">仕様書</h2>
+
+{{Specifications}}
+
+<h2 id="Browser_compatibility">ブラウザーの互換性</h2>
+
+<p>{{Compat}}</p>
+
+<h2 id="See_also">関連情報</h2>
+
+<ul>
+ <li>{{domxref("Element.childElementCount")}}</li>
+ <li>{{domxref("DocumentFragment.childElementCount")}}</li>
+</ul>
diff --git a/files/ja/web/api/documentfragment/childelementcount/index.html b/files/ja/web/api/documentfragment/childelementcount/index.html
new file mode 100644
index 0000000000..16bc5ed135
--- /dev/null
+++ b/files/ja/web/api/documentfragment/childelementcount/index.html
@@ -0,0 +1,48 @@
+---
+title: DocumentFragment.childElementCount
+slug: Web/API/DocumentFragment/childElementCount
+tags:
+ - API
+ - DOM
+ - Property
+ - Reference
+browser-compat: api.DocumentFragment.childElementCount
+translation_of: Web/API/DocumentFragment/childElementCount
+---
+<div>{{ APIRef("DOM") }}</div>
+
+<p><code><strong>Document.childElementCount</strong></code> は読み取り専用のプロパティで、 <code>DocumentFragment</code> の子要素の数を返します。</p>
+
+<p>特定の要素の子要素の数を取得する場合は、 {{domxref("Element.childElementCount")}} を参照してください。</p>
+
+<h2 id="Syntax">構文</h2>
+
+<pre class="brush: js"><em>fragment</em>.childElementCount;
+</pre>
+
+<h2 id="Example">例</h2>
+
+<pre class="brush:js">
+let fragment = new DocumentFragment()
+fragment.childElementCount; // 0
+
+let paragraph = document.createElement('p')
+fragment.appendChild(paragraph)
+
+fragment.childElementCount; // 1
+</pre>
+
+<h2 id="Specifications">仕様書</h2>
+
+{{Specifications}}
+
+<h2 id="Browser_compatibility">ブラウザーの互換性</h2>
+
+<p>{{Compat}}</p>
+
+<h2 id="See_also">関連情報</h2>
+
+<ul>
+ <li>{{domxref("Element.childElementCount")}}</li>
+ <li>{{domxref("Document.childElementCount")}}</li>
+</ul>
diff --git a/files/ja/web/api/element/childelementcount/index.html b/files/ja/web/api/element/childelementcount/index.html
index 57d59747ce..c3520c9a31 100644
--- a/files/ja/web/api/element/childelementcount/index.html
+++ b/files/ja/web/api/element/childelementcount/index.html
@@ -22,11 +22,11 @@ original_slug: Web/API/ParentNode/childElementCount
<pre class="brush:js">let sidebar = document.getElementById('sidebar');
if (sidebar.childElementCount &gt; 0) {
- // Do something
+ // 何もしない
}
</pre>
-<h2 id="Specification">仕様書</h2>
+<h2 id="Specifications">仕様書</h2>
{{Specifications}}