From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../documentorshadowroot/stylesheets/index.html | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 files/ja/web/api/documentorshadowroot/stylesheets/index.html (limited to 'files/ja/web/api/documentorshadowroot/stylesheets') diff --git a/files/ja/web/api/documentorshadowroot/stylesheets/index.html b/files/ja/web/api/documentorshadowroot/stylesheets/index.html new file mode 100644 index 0000000000..48a1e7a169 --- /dev/null +++ b/files/ja/web/api/documentorshadowroot/stylesheets/index.html @@ -0,0 +1,61 @@ +--- +title: DocumentOrShadowRoot.styleSheets +slug: Web/API/DocumentOrShadowRoot/styleSheets +tags: + - API + - Document + - DocumentOrShadowRoot + - Property + - Reference + - ShadowRoot + - Stylesheets + - shadow dom +translation_of: Web/API/DocumentOrShadowRoot/styleSheets +--- +
{{SeeCompatTable}}{{APIRef("Shadow DOM")}}
+ +

{{domxref("DocumentOrShadowRoot")}} インターフェイスの styleSheets 読み取り専用プロパティは、 {{domxref('CSSStyleSheet')}} オブジェクトの {{domxref('StyleSheetList')}} を返します。ドキュメントに明示的にリンクまたは埋め込まれたスタイルシートの場合。

+ +

+ +
function getStyleSheet(unique_title) {
+  for (var i=0; i<document.styleSheets.length; i++) {
+    var sheet = document.styleSheets[i];
+    if (sheet.title == unique_title) {
+      return sheet;
+    }
+  }
+}
+
+ +

Notes

+ +

返されるリストは次の順序で並べられます:

+ + + +

仕様

+ + + + + + + + + + + + + + +
仕様ステータス備考
{{SpecName('Shadow DOM','#extensions-to-the-documentorshadowroot-mixin','DocumentOrShadowRoot')}}{{Spec2('Shadow DOM')}}初回定義
+ +

ブラウザー実装状況

+ + + +

{{Compat("api.DocumentOrShadowRoot.styleSheets")}}

-- cgit v1.2.3-54-g00ecf