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
Copy file name to clipboardExpand all lines: css-typed-om/Overview.bs
+11-8Lines changed: 11 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -250,18 +250,23 @@ The <dfn method for=StylePropertyMap>append(DOMString <var>property</var>,
250
250
251
251
5. Let |values to append| be the empty list.
252
252
253
-
6. For each |value| in |values|:
253
+
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 append|.
254
+
255
+
7. Append |values to append| to the end of |entry|’s list.
256
+
</div>
257
+
258
+
<div algorithm>
259
+
This section describes the <dfn>algorithm that coerces value into an appropriate type for a given property</dfn>, or fails and throws a {{TypeError}}:
254
260
: If |value| is a {{CSSStyleValue}},
255
261
:: If |value| does not match the grammar of a [=list-valued property iteration=] of |property|,
256
262
[=throw=] a {{TypeError}} and exit this algorithm.
257
-
Otherwise, append |value| to the end of |values to append|.
263
+
Otherwise, return the |value|.
258
264
: If |value| is a {{DOMString}},
259
-
:: [=Parse a CSSStyleValue=] with property |property| and value |value|.
265
+
:: [=Parse a CSSStyleValue=] with property |property| and value |value| and return the resulting |value|.
260
266
If the result is null,
261
267
[=throw=] a {{TypeError}} and exit this algorithm.
262
-
Otherwise, append each [=list-valued property iteration=] in the result to the end of |values to append|.
263
-
264
-
7. Append |values to append| to the end of |entry|’s list.
268
+
Otherwise, append each [=list-valued property iteration=] in the result to a |values to append| object
269
+
and return |values to append|.
265
270
</div>
266
271
267
272
<div algorithm>
@@ -309,8 +314,6 @@ the [=property model=]. This list of properties is sorted in the following manne
309
314
310
315
[=computed StylePropertyMap=], [=declared StylePropertyMap=] and [=inline StylePropertyMap=] are all live objects: the attributes and methods on these objects must operate on the actual underlying data, not a snapshot of the data.
311
316
312
-
Issue(145): should refactor out value type-checking, as it'll be needed by the rest of the setters too
313
-
314
317
Issue(148): add detailed descriptions of the rest of the methods on {{StylePropertyMap}}
0 commit comments