From 5192b3e5cfef0c1afca0ce844f9ab6b4d14259e9 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Fri, 27 Aug 2021 20:33:27 +0900 Subject: 旧 ParentNode の childElementCount プロパティの文書を整備 (#2094) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 2021/08/15 時点の英語版に同期 --- .../documentfragment/childelementcount/index.html | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 files/ja/web/api/documentfragment/childelementcount/index.html (limited to 'files/ja/web/api/documentfragment') 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 +--- +
{{ APIRef("DOM") }}
+ +

Document.childElementCount は読み取り専用のプロパティで、 DocumentFragment の子要素の数を返します。

+ +

特定の要素の子要素の数を取得する場合は、 {{domxref("Element.childElementCount")}} を参照してください。

+ +

構文

+ +
fragment.childElementCount;
+
+ +

+ +
+let fragment = new DocumentFragment()
+fragment.childElementCount; // 0
+
+let paragraph = document.createElement('p')
+fragment.appendChild(paragraph)
+
+fragment.childElementCount; // 1
+
+ +

仕様書

+ +{{Specifications}} + +

ブラウザーの互換性

+ +

{{Compat}}

+ +

関連情報

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