Skip to main content

StylePropertyMap

The StylePropertyMap interface of the CSS Typed Object Model API provides a representation of a CSS declaration block that is an alternative to CSSStyleDeclaration.

MDN Reference

Extends​

Methods​

[iterator]()​

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

Returns​

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

Inherited from​

StylePropertyMapReadOnly.[iterator]


append()​

append(property, ...values): void;

The append() method of the StylePropertyMap interface adds the passed CSS value to the StylePropertyMap with the given property.

MDN Reference

Parameters​

ParameterType
propertystring
...values(string | CSSStyleValue)[]

Returns​

void


clear()​

clear(): void;

The clear() method of the StylePropertyMap interface removes all declarations in the StylePropertyMap.

MDN Reference

Returns​

void


delete()​

delete(property): void;

The delete() method of the StylePropertyMap interface removes the CSS declaration with the given property.

MDN Reference

Parameters​

ParameterType
propertystring

Returns​

void


entries()​

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

Returns​

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

Inherited from​

StylePropertyMapReadOnly.entries


forEach()​

forEach(callbackfn, thisArg?): void;

Parameters​

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

Returns​

void

Inherited from​

StylePropertyMapReadOnly.forEach


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

Inherited from​

StylePropertyMapReadOnly.get


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[]

Inherited from​

StylePropertyMapReadOnly.getAll


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

Inherited from​

StylePropertyMapReadOnly.has


keys()​

keys(): StylePropertyMapReadOnlyIterator<string>;

Returns​

StylePropertyMapReadOnlyIterator<string>

Inherited from​

StylePropertyMapReadOnly.keys


set()​

set(property, ...values): void;

The set() method of the StylePropertyMap interface changes the CSS declaration with the given property.

MDN Reference

Parameters​

ParameterType
propertystring
...values(string | CSSStyleValue)[]

Returns​

void


values()​

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

Returns​

StylePropertyMapReadOnlyIterator<Iterable<CSSStyleValue, any, any>>

Inherited from​

StylePropertyMapReadOnly.values

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

Inherited from​

StylePropertyMapReadOnly.size