Skip to content

Commit 702fd86

Browse files
nainarshans
authored andcommitted
Add description for StylePropertyMapReadOnly.set() (w3c#443)
1 parent c5198e3 commit 702fd86

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

css-typed-om/Overview.bs

+17-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,23 @@ The <dfn method for=StylePropertyMap>append(DOMString <var>property</var>,
297297
<div algorithm>
298298
To <dfn>set a value on a StylePropertyMap</dfn>, run these steps:
299299

300-
Issue(148): Write this
300+
1. If |property| does not start with two dashes (U+002D HYPHEN),
301+
let |property| be |property| [=ASCII lowercased=].
302+
303+
2. If |property| is not a [=supported property name=],
304+
[=throw=] a {{TypeError}} and exit this algorithm.
305+
306+
3. If {{StylePropertyMap}}’s [=property model=] contains an entry for |property|,
307+
let |entry| be that entry.
308+
Otherwise, exit the algorithm.
309+
310+
4. Empty the list of |values| currently stored on the |entry|.
311+
312+
5. Let |values to set| be an empty list.
313+
314+
6. For each |value| in |values| if the [=algorithm that coerces value into an appropriate type for a given property=] does not throw an error, append the returned object to |values to set|.
315+
316+
7. Set |values to set| to be |entry|’s list.
301317
</div>
302318

303319
The <dfn method for=StylePropertyMap>update(DOMString <var>property</var>,

0 commit comments

Comments
 (0)