@@ -534,19 +534,27 @@ partial interface Element {
534534represent the [=computed values=] of an {{Element}} ,
535535and are accessed by calling the {{Element/computedStyleMap()}} method.
536536
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+
537542<div algorithm>
538543 The <dfn method for="Element">computedStyleMap()</dfn> method must,
539544 when called on an {{Element}} |this|,
540545 perform the following steps:
541546
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,
543549 whose {{[[declarations]]}} internal slot internal slot are the name and [=computed value=] of
544550 every longhand CSS property supported by the User Agent,
545551 every registered [=custom property=] ,
546552 and every non-registered [=custom property=] which is not set to its initial value
547553 on |this|,
548554 ordered by putting CSS-defined properties before custom properties,
549555 then sorting by code-point order of property name within those two categories.
556+
557+ 2. Return |this|'s {{Element/[[computedStyleMapCache]]}} internal slot.
550558</div>
551559
552560Note: like {{Window/getComputedStyle()|Window.getComputedStyle()}} ,
0 commit comments