Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion css-typed-om/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -553,19 +553,27 @@ partial interface Element {
represent the [=computed values=] of an {{Element}},
and are accessed by calling the {{Element/computedStyleMap()}} method.

Every {{Element}} has a <dfn attribute for=Element>\[[computedStyleMapCache]]</dfn> internal slot,
initially set to `null`,
which caches the result of the {{Element/computedStyleMap()}} method
when it is first called.

<div algorithm>
The <dfn method for="Element">computedStyleMap()</dfn> method must,
when called on an {{Element}} |this|,
perform the following steps:

1. Return a live {{StylePropertyMapReadOnly}} object,
1. If |this|'s {{Element/[[computedStyleMapCache]]}} internal slot is set to `null`,
set its value to a live {{StylePropertyMapReadOnly}} object,
whose {{[[declarations]]}} internal slot internal slot are the name and [=computed value=] of
every longhand CSS property supported by the User Agent,
every registered [=custom property=],
and every non-registered [=custom property=] which is not set to its initial value
on |this|,
ordered by putting CSS-defined properties before custom properties,
then sorting by code-point order of property name within those two categories.

2. Return |this|'s {{Element/[[computedStyleMapCache]]}} internal slot.
</div>

Note: like {{Window/getComputedStyle()|Window.getComputedStyle()}},
Expand Down