Skip to content

Commit 1ac17d3

Browse files
darrnshntabatkins
authored andcommitted
Make CSSNumericArray an iterable (w3c#607)
1 parent e643f5e commit 1ac17d3

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

css-typed-om/Overview.bs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1706,7 +1706,11 @@ interface CSSMathMax : CSSMathValue {
17061706
readonly attribute CSSNumericArray values;
17071707
};
17081708

1709-
interface CSSNumericArray {}; // See issue below
1709+
interface CSSNumericArray {
1710+
iterable<CSSNumericValue>;
1711+
readonly attribute unsigned long length;
1712+
getter CSSNumericValue (unsigned long index);
1713+
};
17101714

17111715
enum CSSMathOperator {
17121716
"sum",
@@ -1718,10 +1722,6 @@ enum CSSMathOperator {
17181722
};
17191723
</xmp>
17201724

1721-
Issue(486): {{CSSNumericArray}} will be an Array-like
1722-
restricted to containing CSSNumericValue objects.
1723-
This is dependent on [WebIDL#345](https://github.com/heycam/webidl/issues/345) getting resolved properly.
1724-
17251725
Note: CSSMathValue, being a pure superclass,
17261726
cannot be directly constructed.
17271727
It exists solely to host the common attributes
@@ -1832,6 +1832,9 @@ of all the "math" operations.
18321832
</dl>
18331833
</div>
18341834

1835+
The <dfn attribute for=CSSNumericArray>length</dfn> attribute of {{CSSNumericArray}} indicates how many {{CSSNumericValue}}s are contained within the {{CSSNumericArray}}.
1836+
1837+
The <dfn for=CSSNumericArray>indexed getter</dfn> of {{CSSNumericArray}} retrieves the {{CSSNumericValue}} at the provided index.
18351838

18361839
<!--
18371840
██ ██ ██ ██ ██ ██ ██████ ██████ ██████

0 commit comments

Comments
 (0)