Skip to content

Commit 45f0b11

Browse files
committed
[typed-om] Start leaning on CSSOM stuff to get the underlying value -> stylepropertymap connection.
1 parent eab1fdb commit 45f0b11

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

css-typed-om/Overview.bs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,10 @@ interface StylePropertyMap : StylePropertyMapReadOnly {
298298
};
299299
</xmp>
300300

301+
{{StylePropertyMap}} is an alternate way to represent a [=CSS declarations block=] as an object
302+
(when fetched via the [[cssom]],
303+
[=CSS declaration blocks=] are instead represented as {{CSSStyleDeclarations}} objects.)
304+
301305
<!--
302306
We restrict the read-write version from workers/worklets
303307
because append()/set() require parsing to accept USVStrings,
@@ -311,14 +315,12 @@ interface StylePropertyMap : StylePropertyMapReadOnly {
311315
<div algorithm="StylePropertyMap.[[declarations]]">
312316
A {{StylePropertyMapReadOnly}} object
313317
has a <dfn attribute for="StylePropertyMapReadonly, StylePropertyMap">\[[declarations]]</dfn> internal slot,
314-
which contains a <dfn export for="StylePropertyMapReadonly, StylePropertyMap">declarations map</dfn>,
315-
which is a [=map=] whose keys are [=strings=] (representing property names)
316-
and whose values are [=underlying values=].
317-
This list is initialized differently depending on where the {{StylePropertyMap}} is used
318-
(see [[#computed-stylepropertymapreadonly-objects]]
319-
and [[#declared-stylepropertymap-objects]]).
318+
which is a [=map=] reflecting the [=CSS declaration block=]'s [=CSSStyleDeclaration/declarations=].
320319

321-
Issue: Define the global.
320+
Note: The [=CSSStyleDeclaration/declarations=] are not yet defined using [[infra]] terminology,
321+
but for the purpose of this spec
322+
it's assumed to be a [=map=] whose keys are [=strings=] (representing property names)
323+
and whose values are [=underlying values=] for those properties.
322324

323325
Unless otherwise stated,
324326
the initial ordering of the {{[[declarations]]}} internal slot
@@ -549,7 +551,7 @@ probably in an appendix.
549551
when called on a {{StylePropertyMap}} |this|,
550552
must perform the following steps:
551553

552-
1. Replace the value of |this|’s {{[[declarations]]}} internal slot with a fresh empty [=declarations map=].
554+
1. [=map/Remove=] all of the declarations in |this|’s {{[[declarations]]}} internal slot.
553555
</div>
554556

555557
<div algorithm>

0 commit comments

Comments
 (0)