Skip to main content

StylePropertyMapReadOnly

The StylePropertyMapReadOnly interface of the CSS Typed Object Model API provides a read-only representation of a CSS declaration block that is an alternative to CSSStyleDeclaration. Retrieve an instance of this interface using Element.computedStyleMap().

MDN Reference

Extended by

Methods

[iterator]()

iterator: StylePropertyMapReadOnlyIterator<[string, Iterable<CSSStyleValue, any, any>]>;

Returns

StylePropertyMapReadOnlyIterator<[string, Iterable<CSSStyleValue, any, any>]>


entries()

entries(): StylePropertyMapReadOnlyIterator<[string, Iterable<CSSStyleValue, any, any>]>;

Returns

StylePropertyMapReadOnlyIterator<[string, Iterable<CSSStyleValue, any, any>]>


forEach()

forEach(callbackfn, thisArg?): void;

Parameters

ParameterType
callbackfn(value, key, parent) => void
thisArg?any

Returns

void


get()

get(property): CSSStyleValue | undefined;

The get() method of the StylePropertyMapReadOnly interface returns a CSSStyleValue object for the first value of the specified property.

MDN Reference

Parameters

ParameterType
propertystring

Returns

CSSStyleValue | undefined


getAll()

getAll(property): CSSStyleValue[];

The getAll() method of the StylePropertyMapReadOnly interface returns an array of CSSStyleValue objects containing the values for the provided property.

MDN Reference

Parameters

ParameterType
propertystring

Returns

CSSStyleValue[]


has()

has(property): boolean;

The has() method of the StylePropertyMapReadOnly interface indicates whether the specified property is in the StylePropertyMapReadOnly object.

MDN Reference

Parameters

ParameterType
propertystring

Returns

boolean


keys()

keys(): StylePropertyMapReadOnlyIterator<string>;

Returns

StylePropertyMapReadOnlyIterator<string>


values()

values(): StylePropertyMapReadOnlyIterator<Iterable<CSSStyleValue, any, any>>;

Returns

StylePropertyMapReadOnlyIterator<Iterable<CSSStyleValue, any, any>>

Properties

size

readonly size: number;

The size read-only property of the StylePropertyMapReadOnly interface returns an unsigned long integer containing the size of the StylePropertyMapReadOnly object.

MDN Reference