@@ -213,15 +213,15 @@ interface StylePropertyMap : StylePropertyMapReadOnly {
213
213
};
214
214
</pre>
215
215
216
- A {{StylePropertyMapReadOnly}} object has an associated <dfn>property model </dfn> ,
217
- which is a list of property - sequence< {{CSSStyleValue}} > pairs. This list
218
- is initialized differently depending on where the {{CSSStyleValue}} is used
216
+ A {{StylePropertyMapReadOnly}} object has an associated <dfn export for="StylePropertyMapReadonly, StylePropertyMap">contained properties map </dfn> ,
217
+ which is a [=map=] of property name ( [=string=] ) → values ( [=list=] of {{CSSStyleValue}} objects) pairs.
218
+ This list is initialized differently depending on where the {{CSSStyleValue}} is used
219
219
(see
220
220
[[#computed-stylepropertymapreadonly-objects]] ,
221
221
[[#declared-stylepropertymap-objects]] , and
222
222
[[#inline-stylepropertymap-objects]] ).
223
223
224
- All properties stored on the [=property model =] in {{StylePropertyMapReadOnly}} are [=ASCII case-insensitive=] .
224
+ All properties stored on the [=contained properties map =] in {{StylePropertyMapReadOnly}} are [=ASCII case-insensitive=] .
225
225
226
226
<div class='note'>
227
227
The sequence of {{CSSStyleValue}} s associated with a property do
@@ -251,10 +251,10 @@ The <dfn method for=StylePropertyMap>append(DOMString <var>property</var>,
251
251
3. If |property| is not a [=list-valued property=] ,
252
252
[=throw=] a {{TypeError}} and exit this algorithm.
253
253
254
- 4. If {{StylePropertyMap}} ’s [=property model =] contains an entry for |property|,
254
+ 4. If {{StylePropertyMap}} ’s [=contained properties map =] contains an entry for |property|,
255
255
let |entry| be that entry.
256
256
Otherwise, create a new entry for |property| with an empty list,
257
- add it to the [=property model =] ,
257
+ add it to the [=contained properties map =] ,
258
258
and let |entry| be the newly-created entry.
259
259
260
260
5. Let |values to append| be the empty list.
@@ -273,8 +273,8 @@ The <dfn method for=StylePropertyMap>append(DOMString <var>property</var>,
273
273
2. If |property| is not a [=supported property name=] ,
274
274
[=throw=] a {{TypeError}} and exit this algorithm.
275
275
276
- 3. If {{StylePropertyMap}} ’s [=property model =] contains an entry for |property|,
277
- remove that entry from the [=property model =] .
276
+ 3. If {{StylePropertyMap}} ’s [=contained properties map =] contains an entry for |property|,
277
+ remove that entry from the [=contained properties map =] .
278
278
</div>
279
279
280
280
<div algorithm>
@@ -300,7 +300,7 @@ The <dfn method for=StylePropertyMap>append(DOMString <var>property</var>,
300
300
2. If |property| is not a [=supported property name=] ,
301
301
[=throw=] a {{TypeError}} and exit this algorithm.
302
302
303
- 3. If {{StylePropertyMap}} ’s [=property model =] contains an entry for |property|,
303
+ 3. If {{StylePropertyMap}} ’s [=contained properties map =] contains an entry for |property|,
304
304
return the first value found in that entry.
305
305
306
306
4. Else, return `null`.
@@ -315,7 +315,7 @@ The <dfn method for=StylePropertyMap>append(DOMString <var>property</var>,
315
315
2. If |property| is not a [=supported property name=] ,
316
316
[=throw=] a {{TypeError}} and exit this algorithm.
317
317
318
- 3. If {{StylePropertyMap}} ’s [=property model =] contains an entry for |property|:
318
+ 3. If {{StylePropertyMap}} ’s [=contained properties map =] contains an entry for |property|:
319
319
320
320
1. If |property| is a [=list-valued property=] ,
321
321
return the list of |values| assigned to that property.
@@ -341,15 +341,18 @@ The <dfn method for=StylePropertyMap>append(DOMString <var>property</var>,
341
341
342
342
343
343
<div algorithm>
344
- To <dfn>set a value on a StylePropertyMap</dfn> , run these steps:
344
+ To <dfn>set a value on a StylePropertyMap</dfn> ,
345
+ given a [=string=] |property|
346
+ and a [=list=] of {{CSSPropertyValue}} objects |value|,
347
+ run these steps:
345
348
346
349
1. If |property| does not start with two dashes (U+002D HYPHEN),
347
350
let |property| be |property| [=ASCII lowercased=] .
348
351
349
352
2. If |property| is not a [=supported property name=] ,
350
353
[=throw=] a {{TypeError}} and exit this algorithm.
351
354
352
- 3. If {{StylePropertyMap}} ’s [=property model =] contains an entry for |property|,
355
+ 3. If {{StylePropertyMap}} ’s [=contained properties map =] contains an entry for |property|,
353
356
let |entry| be that entry.
354
357
Otherwise, exit the algorithm.
355
358
@@ -385,8 +388,8 @@ map set to the object this method was invoked on .
385
388
386
389
</div>
387
390
388
- The <dfn method for=StylePropertyMap>getProperties()</dfn> method returns all of the properties listed in
389
- the [=property model =] . This list of properties is sorted in the following manner:
391
+ The <dfn method for=StylePropertyMap>getProperties()</dfn> method returns all of the contained properties maped in
392
+ the [=contained properties map =] . This list of properties is sorted in the following manner:
390
393
391
394
* normal properties are sorted alphabetically.
392
395
* custom properties are sorted by increasing code point order.
@@ -413,7 +416,7 @@ partial interface Element {
413
416
{{Element}} or pseudo element, and are accessed by calling the
414
417
{{Element/computedStyleMap()}} method.
415
418
416
- When constructed, the [=property model =] for [=computed StylePropertyMap=]
419
+ When constructed, the [==] for [=computed StylePropertyMap=]
417
420
objects is initialized to contain an entry for every valid CSS property supported by the User Agent.
418
421
419
422
Note: The StylePropertyMap returned by computedStyleMap represents computed style,
@@ -433,7 +436,7 @@ partial interface CSSStyleRule {
433
436
in a style rule, and are accessed via the <dfn attribute for=CSSStyleRule>attributeStyleMap</dfn>
434
437
attribute of {{CSSStyleRule}} objects.
435
438
436
- When constructed, the [=property model =] for [=declared StylePropertyMap=]
439
+ When constructed, the [=contained properties map =] for [=declared StylePropertyMap=]
437
440
objects is initialized to contain
438
441
an entry for each property that is paired with at least one valid value inside the
439
442
{{CSSStyleRule}} that the object represents. The value for a given property is
@@ -453,7 +456,7 @@ partial interface Element {
453
456
directly to {{Element}} s. They are accessed via the <dfn attribute for=Element>attributeStyleMap</dfn>
454
457
attribute of {{Element}} objects.
455
458
456
- When constructed, the [=property model =] for [=inline StylePropertyMap=] objects
459
+ When constructed, the [=contained properties map =] for [=inline StylePropertyMap=] objects
457
460
is initialized to contain an
458
461
entry for each property that is paired with at least one valid value in the string
459
462
representing the style attribute for the Element that the object is associated with.
0 commit comments