StylePropertyMapReadOnly: values()-Methode
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Die StylePropertyMapReadOnly.values()
-Methode gibt einen neuen Array-Iterator zurück, der die Werte für jeden Index im StylePropertyMapReadOnly
-Objekt enthält.
Syntax
values()
Parameter
Keine.
Rückgabewert
Ein neues Array
.
Beispiele
In diesem Beispiel verwenden wir die values()
-Methode, um auf die Werte im Element.computedStyleMap()
zugreifen zu können.
// 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
Spezifikationen
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-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
values |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.