aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahiro FUJIMOTO <mfujimot@gmail.com>2022-03-05 12:47:35 +0900
committerpotappo <potappo@gmail.com>2022-03-12 13:34:13 +0900
commit8d8aabed0956c3f50cb3ee9743966b1060d34d3a (patch)
treeb2e3de537d363730db3f842602440c6dd2177dfe
parent8b67957d078ae8b8e56f540ddcbd6e2f50585990 (diff)
downloadtranslated-content-8d8aabed0956c3f50cb3ee9743966b1060d34d3a.tar.gz
translated-content-8d8aabed0956c3f50cb3ee9743966b1060d34d3a.tar.bz2
translated-content-8d8aabed0956c3f50cb3ee9743966b1060d34d3a.zip
2021/09/15 時点の英語版に基づき新規翻訳
-rw-r--r--files/ja/web/api/stylepropertymapreadonly/entries/index.md58
1 files changed, 58 insertions, 0 deletions
diff --git a/files/ja/web/api/stylepropertymapreadonly/entries/index.md b/files/ja/web/api/stylepropertymapreadonly/entries/index.md
new file mode 100644
index 0000000000..2a6aaeb799
--- /dev/null
+++ b/files/ja/web/api/stylepropertymapreadonly/entries/index.md
@@ -0,0 +1,58 @@
+---
+title: StylePropertyMapReadOnly.entries()
+slug: Web/API/StylePropertyMapReadOnly/entries
+tags:
+ - API
+ - CSS 型付きオブジェクトモデル API
+ - 実験的
+ - Houdini
+ - メソッド
+ - リファレンス
+ - StylePropertyMapReadOnly
+ - entries()
+browser-compat: api.StylePropertyMapReadOnly.entries
+translation_of: Web/API/StylePropertyMapReadOnly/entries
+---
+{{APIRef("CSS Typed Object Model API")}}{{SeeCompatTable}}
+
+**`StylePropertyMapReadOnly.entries()`** メソッドは、このオブジェクトが持つ列挙可能なプロパティの `[key, value]` の組の配列を、 {{jsxref("Statements/for...in", "for...in")}} ループで提供されるのと同じ順序で返します(違いは for-in ループではプロトタイプチェーン内のプロパティも列挙する点です)。
+
+## 構文
+
+```js
+StylePropertyMapReadOnly.entries()
+```
+
+### 引数
+
+なし。
+
+### 返値
+
+この `StylePropertyMapReadOnly` オブジェクトが持つ列挙可能な `[key, value]` の組の配列です。
+
+## 例
+
+こちらは、 `StylePropertyMapReadOnly.entries()` メソッドを使用して要素の計算済みスタイルを取得する例です。
+
+```js
+// DOM 要素を取得
+const buttonEl = document.querySelector('button');
+
+// `computedStyleMap` ですべての計算済みスタイルが取得できます
+const allComputedStyles = buttonEl.computedStyleMap();
+
+// entries は項目の反復可能オブジェクトを返します
+const iterableStyles = allComputedStyles.entries();
+
+// align-content を最初の項目、 CSSStyleValue を 2 番目の項目とする 2 項目の配列を返します。
+console.log(iterableStyles.next().value);
+```
+
+## 仕様書
+
+{{Specifications}}
+
+## ブラウザーの互換性
+
+{{Compat}}