@@ -534,19 +534,27 @@ partial interface Element {
534
534
represent the [=computed values=] of an {{Element}} ,
535
535
and are accessed by calling the {{Element/computedStyleMap()}} method.
536
536
537
+ Every {{Element}} has a <dfn attribute for=Element>\[[computedStyleMapCache]]</dfn> internal slot,
538
+ initially set to `null`,
539
+ which caches the result of the {{Element/computedStyleMap()}} method
540
+ when it is first called.
541
+
537
542
<div algorithm>
538
543
The <dfn method for="Element">computedStyleMap()</dfn> method must,
539
544
when called on an {{Element}} |this|,
540
545
perform the following steps:
541
546
542
- 1. Return a live {{StylePropertyMapReadOnly}} object,
547
+ 1. If |this|'s {{Element/[[computedStyleMapCache]]}} internal slot is set to `null`,
548
+ set its value to a live {{StylePropertyMapReadOnly}} object,
543
549
whose {{[[declarations]]}} internal slot internal slot are the name and [=computed value=] of
544
550
every longhand CSS property supported by the User Agent,
545
551
every registered [=custom property=] ,
546
552
and every non-registered [=custom property=] which is not set to its initial value
547
553
on |this|,
548
554
ordered by putting CSS-defined properties before custom properties,
549
555
then sorting by code-point order of property name within those two categories.
556
+
557
+ 2. Return |this|'s {{Element/[[computedStyleMapCache]]}} internal slot.
550
558
</div>
551
559
552
560
Note: like {{Window/getComputedStyle()|Window.getComputedStyle()}} ,
0 commit comments