Skip to content

Commit 461368d

Browse files
committed
[cssom] Move styleSheets to DocumentOrShadowRoot.
Fixes w3c#548
1 parent 3a8be81 commit 461368d

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

cssom-1/Overview.bs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ spec:css-position-3; type:property; text:left
114114
spec:html; type:element; text:style
115115
spec:css-namespaces-3; type:dfn; text:namespace prefix
116116
spec:dom; type:interface; text:Document
117+
spec:dom; type:interface; text:DocumentOrShadowRoot
117118
spec:html; type:dfn; text:ascii case-insensitive
118119
spec:html; type:dfn; text:case-sensitive
119120
spec:infra; type:dfn; text:list
@@ -944,14 +945,14 @@ CSS Style Sheet Collections {#css-style-sheet-collections}
944945
----------------------------------------------------------
945946

946947
Below various new concepts are defined that are associated with each
947-
{{Document}} object.
948+
{{DocumentOrShadowRoot}} object.
948949

949-
Each {{Document}} has an associated list of zero or more
950+
Each {{DocumentOrShadowRoot}} has an associated list of zero or more
950951
<a>CSS style sheets</a>, named the
951-
<dfn export for=Document>document CSS style sheets</dfn>. This is
952+
<dfn export for=DocumentOrShadowRoot>document or shadow root CSS style sheets</dfn>. This is
952953
an ordered list that contains all
953954
<a>CSS style sheets</a> associated with the
954-
{{Document}}, in
955+
{{DocumentOrShadowRoot}}, in
955956
<a>tree order</a>, with
956957
<a>CSS style sheets</a> created from HTTP
957958
<code>Link</code> headers first, if any, in header
@@ -976,7 +977,7 @@ steps:
976977

977978
<ol>
978979
<li>Add the <a>CSS style sheet</a> to the list of
979-
<a>document CSS style sheets</a> at the appropriate location. The
980+
<a>document or shadow root CSS style sheets</a> at the appropriate location. The
980981
remainder of these steps deal with the
981982
<a>disabled flag</a>.
982983

@@ -1010,7 +1011,7 @@ steps:
10101011
To <dfn export>remove a CSS style sheet</dfn>, run these steps:
10111012

10121013
<ol>
1013-
<li>Remove the <a>CSS style sheet</a> from the list of <a>document CSS style sheets</a>.
1014+
<li>Remove the <a>CSS style sheet</a> from the list of <a>document or shadow root CSS style sheets</a>.
10141015

10151016
<li>Set the <a>CSS style sheet</a>'s <a for=CSSStyleSheet>parent CSS style sheet</a>,
10161017
<a for=CSSStyleSheet>owner node</a> and <a for=CSSStyleSheet>owner CSS rule</a> to null.
@@ -1021,14 +1022,14 @@ To <dfn export>remove a CSS style sheet</dfn>, run these steps:
10211022
</ol>
10221023

10231024
A <dfn export>persistent CSS style sheet</dfn> is a
1024-
<a>CSS style sheet</a> from the <a>document CSS style sheets</a>
1025+
<a>CSS style sheet</a> from the <a>document or shadow root CSS style sheets</a>
10251026
whose <a>title</a> is the empty string and whose
10261027
<a>alternate flag</a> is unset.
10271028

10281029
A <dfn export>CSS style sheet set</dfn> is an ordered
10291030
collection of one or more <a>CSS style sheets</a>
1030-
from the <a>document CSS style sheets</a> which have an identical
1031-
<a>title</a> that is not the empty string.
1031+
from the <a>document or shadow root CSS style sheets</a>
1032+
which have an identical <a>title</a> that is not the empty string.
10321033

10331034
A <dfn export>CSS style sheet set name</dfn> is the
10341035
<a>title</a> the <a>CSS style sheet set</a> has in
@@ -1138,17 +1139,16 @@ sheet</a> in the collection. If there is no <var>index</var>th object in the col
11381139
The <dfn attribute for=StyleSheetList>length</dfn> attribute must return the number of <a>CSS style sheets</a>
11391140
represented by the collection.
11401141

1141-
### Extensions to the {{Document}} Interface ### {#extensions-to-the-document-interface}
1142+
### Extensions to the {{DocumentOrShadowRoot}} Interface ### {#extensions-to-the-document-or-shadow-root-interface}
11421143

11431144
<pre class=idl>
1144-
partial interface Document {
1145+
partial interface DocumentOrShadowRoot {
11451146
[SameObject] readonly attribute StyleSheetList styleSheets;
11461147
};
11471148
</pre>
11481149

1149-
The <dfn attribute for=Document>styleSheets</dfn> attribute must return a {{StyleSheetList}} collection representing
1150-
the <a>document CSS style sheets</a>.
1151-
1150+
The <dfn attribute for=DocumentOrShadowRoot>styleSheets</dfn> attribute must return a {{StyleSheetList}} collection representing
1151+
the <a>document or shadow root CSS style sheets</a>.
11521152

11531153
Style Sheet Association {#style-sheet-association}
11541154
--------------------------------------------------
@@ -1196,7 +1196,7 @@ To <dfn export>fetch a CSS style sheet</dfn> with parsed URL <var>parsed URL</va
11961196
### The {{LinkStyle}} Interface ### {#the-linkstyle-interface}
11971197

11981198
The <dfn export>associated CSS style sheet</dfn> of a node is the <a>CSS style sheet</a> in the list of
1199-
<a>document CSS style sheets</a> of which the <a for=CSSStyleSheet>owner node</a> implements the {{LinkStyle}}
1199+
<a>document or shadow root CSS style sheets</a> of which the <a for=CSSStyleSheet>owner node</a> implements the {{LinkStyle}}
12001200
interface.
12011201

12021202
<pre class=idl>
@@ -2968,7 +2968,7 @@ generally not listed.
29682968

29692969
Changes From 5 December 2013 {#changes-from-5-december-2013}
29702970
------------------------------------------------------------
2971-
2971+
* The <code>styleSheets</code> IDL attribute is moved from {{Document}} to {{DocumentOrShadowRoot}}.
29722972
* API for alternative stylesheets is removed: <code>selectedStyleSheetSet</code>,
29732973
<code>lastStyleSheetSet</code>, <code>preferredStyleSheetSet</code>,
29742974
<code>styleSheetSets</code>, <code>enableStyleSheetsForSet()</code> on {{Document}}.

0 commit comments

Comments
 (0)