StylePropertyMap
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Want more browser support for this feature? Tell us why.
The StylePropertyMap interface of the CSS Typed Object Model API provides a representation of a CSS declaration block that is an alternative to CSSStyleDeclaration.
Note:
This interface is only available on the window thread; unlike other interfaces in this API it cannot be accessed in Worker or Worklet contexts.
Worklets receive a read-only snapshot of an element's style through StylePropertyMapReadOnly.
Instance properties
Also inherits properties from its parent interface, StylePropertyMapReadOnly.
Instance methods
Also inherits methods from its parent interface, StylePropertyMapReadOnly.
StylePropertyMap.append()-
Adds a new CSS declaration to the
StylePropertyMapwith the given property and value. StylePropertyMap.clear()-
Removes all declarations in the
StylePropertyMap. StylePropertyMap.delete()-
Removes the CSS declaration with the given property.
StylePropertyMap.set()-
Changes the CSS declaration with the given property.
Specifications
| Specification |
|---|
| CSS Typed OM Level 1> # the-stylepropertymap> |