aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/shadowroot/stylesheets/index.md
blob: 7ce492136cdf224380639ddf04cce9adaeeafb04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
title: ShadowRoot.styleSheets
slug: Web/API/ShadowRoot/styleSheets
tags:
  - API
  - ShadowRoot
  - プロパティ
  - リファレンス
  - スタイルシート
browser-compat: api.ShadowRoot.styleSheets
---
{{APIRef("CSSOM")}}

**`styleSheets`** は {{domxref("ShadowRoot")}} インターフェイスの読み取り専用プロパティで、シャドウツリーに明示的にリンクされるか埋め込まれたスタイルシートを表す {{domxref('CSSStyleSheet')}} オブジェクトの {{domxref('StyleSheetList')}} を返します。

## 構文

```js
shadowRoot.styleSheets
```

### 値

{{domxref('CSSStyleSheet')}} オブジェクトの {{domxref('StyleSheetList')}} です。

## 例

```js
let customElem = document.querySelector('my-shadow-dom-element');
let shadow = customElem.shadowRoot;
let styleSheets = shadow.styleSheets;
```

## 仕様書

{{Specifications}}

## ブラウザーの互換性

{{Compat}}