You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[cssom] Use an interface instead of sequence for CSSRuleList and StyleSheetList, since there may be content that rely on item() working. Align with DOM's NodeList. https://www.w3.org/Bugs/Public/show_bug.cgi?id=22133
<p>The <dfn>StyleSheetList</dfn> sequence represents an ordered collection of <spantitle='style sheets'>style sheets</span>.</p>
1117
+
<p>The <code>StyleSheetList</code> interface represents an ordered collection of <span>style sheets</span>.</p>
1119
1118
1119
+
<preclass=idl>[ArrayClass]
1120
+
interface <dfn>StyleSheetList</dfn> {
1121
+
getter <span>StyleSheet</span>? <spantitle=dom-StyleSheetList-item>item</span>(unsigned long index);
1122
+
readonly attribute unsigned long <spantitle=dom-StyleSheetList-length>length</span>;
1123
+
};</pre>
1124
+
1125
+
<p>The object's <spandata-anolis-spec=webidl>supported property indices</span> are the numbers in the range zero to one less than the number of <span>style sheets</span> represented by the collection. If there are no such <span>style sheets</span>, then there are no <spandata-anolis-spec=webidl>supported property indices</span>.
1126
+
1127
+
<p>The <dfntitle=dom-StyleSheetList-item><code>item(<var>index</var>)</code></dfn> method must return the <var>index</var>th <span>style sheet</span> in the collection. If there is no <var>index</var>th object in the collection, then the method must return <code>null</code>.
1128
+
1129
+
<p>The <dfntitle=dom-StyleSheetList-length><code>length</code></dfn> attribute must return the number of <span>style sheets</span> represented by the collection.
1120
1130
1121
1131
<h4>Extensions to the <codetitle>Document</code> Interface</h4>
1122
1132
@@ -1177,7 +1187,7 @@ <h4>Extensions to the <code title>Document</code> Interface</h4>
1177
1187
void <spantitle=dom-Document-enableStyleSheetsForSet>enableStyleSheetsForSet</span>(DOMString? name);<!-- new -->
1178
1188
};</pre>
1179
1189
1180
-
<p>The <dfntitle=dom-Document-styleSheets><code>styleSheets</code></dfn> attribute must return a <code>StyleSheetList</code>sequence representing
1190
+
<p>The <dfntitle=dom-Document-styleSheets><code>styleSheets</code></dfn> attribute must return a <code>StyleSheetList</code>collection representing
1181
1191
the <span>document style sheets</span>.</p>
1182
1192
<pclass='note'>Because of historical IDL limitations the <codetitle=dom-Document-styleSheets>styleSheets</code> attribute
1183
1193
used to be on a separate interface, <code>DocumentStyle</code>.</p>
<p>The object's <spandata-anolis-spec=webidl>supported property indices</span> are the numbers in the range zero to one less than the number of <code>CSSRule</code> objects represented by the collection. If there are no such <code>CSSRule</code> objects, then there are no <spandata-anolis-spec=webidl>supported property indices</span>.
1679
1697
1680
-
<p>The <dfn><code>CSSRuleList</code></dfn>sequence represents an ordered collection of CSS style rules.</p>
1698
+
<p>The <dfntitle=dom-StyleSheetList-item><code>item(<var>index</var>)</code></dfn>method must return the <var>index</var>th <code>CSSRule</code> object in the collection. If there is no <var>index</var>th object in the collection, then the method must return <code>null</code>.
1681
1699
1700
+
<p>The <dfntitle=dom-StyleSheetList-length><code>length</code></dfn> attribute must return the number of <code>CSSRule</code> objects represented by the collection.
0 commit comments