The getAll()
method of the StylePropertyMapReadOnly
interface returns an array of CSSStyleValue
objects containing the values for the provided property.
var cssStyleValues[] = StylePropertyMapReadOnly.getAll(property)
An array of CSSStyleValue
objects.
The following example uses getAll()
with the background-image
property. An Array
is returned which contains an item for each background image declared.
const buttonEl = document.querySelector('button');
const allComputedStyles = buttonEl.computedStyleMap();
const allBkImages = allComputedStyles.getAll('background-image');
console.log(allBkImages);