StylePropertyMapReadOnly.values()

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The StylePropertyMapReadOnly.values() method returns a new array iterator containing the values for each index in the StylePropertyMapReadOnly object.

Syntax

StylePropertyMapReadOnly.values()

Parameters

None.

Return value

A new Array.

Example

In this example we use the values() method to be able to access the values within our Element.computedStyleMap().

// get a button element
const buttonEl = document.querySelector('button');

// we can retrieve all computed styles with `computedStyleMap`
const allComputedStyles = buttonEl.computedStyleMap();

// values returns an iterable list of the css values
const vals = allComputedStyles.values();
console.log(vals.next().value); // returns a CSSStyleValue

Specifications

No specification found

No specification data found for api.StylePropertyMapReadOnly.values.
Check for problems with this page or contribute a missing spec_url to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

Browser compatibility

BCD tables only load in the browser