aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/documentorshadowroot/stylesheets/index.html
blob: cf6e1c38ce5e5b4513ce7ceef43c07237ee321e4 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
title: DocumentOrShadowRoot.styleSheets
slug: Web/API/DocumentOrShadowRoot/styleSheets
tags:
  - API
  - Document
  - Propert
  - Reference
translation_of: Web/API/DocumentOrShadowRoot/styleSheets
---
<div>{{SeeCompatTable}}{{APIRef("Shadow DOM")}}</div>

<p>{{domxref("DocumentOrShadowRoot")}} 인터페이스의 <strong><code>styleSheets</code></strong> 읽기 전용 속성은 문서에서 명시적으로 링크했거나, 안에 포함된 스타일시트에 대한 {{domxref('CSSStyleSheet')}} 객체의 {{domxref('StyleSheetList')}}를 반환합니다.</p>

<h2 id="예제">예제</h2>

<pre class="brush: js">function getStyleSheet(unique_title) {
  for(var i=0; i&lt;document.styleSheets.length; i++) {
    var sheet = document.styleSheets[i];
    if(sheet.title == unique_title) {
      return sheet;
    }
  }
}
</pre>

<h3 id="참고">참고</h3>

<p>반환 된 목록은 다음과 같이 정렬됩니다:</p>

<ul>
 <li>{{htmlelement("link")}} 헤더에서 검색된 스타일시트가 먼저 배치되고, 헤더 순서로 정렬됩니다.</li>
 <li>DOM에서 검색된 스타일시트는 <a href="https://dom.spec.whatwg.org/#concept-tree-order">tree order</a>로 정렬되어 배치됩니다.</li>
</ul>

<h2 id="명세">명세</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('Shadow DOM','#extensions-to-the-documentorshadowroot-mixin','DocumentOrShadowRoot')}}</td>
   <td>{{Spec2('Shadow DOM')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="브라우저_호환성">브라우저 호환성</h2>



<p>{{Compat("api.DocumentOrShadowRoot.styleSheets")}}</p>