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.
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.
Parameters
| Parameter | Type |
|---|---|
property | string |
...values | (string | CSSStyleValue)[] |
Returns
void
clear()
clear(): void;
The clear() method of the StylePropertyMap interface removes all declarations in the StylePropertyMap.
Returns
void
delete()
delete(property): void;
The delete() method of the StylePropertyMap interface removes the CSS declaration with the given property.
Parameters
| Parameter | Type |
|---|---|
property | string |
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
| Parameter | Type |
|---|---|
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.
Parameters
| Parameter | Type |
|---|---|
property | string |
Returns
CSSStyleValue | undefined
Inherited from
getAll()
getAll(property): CSSStyleValue[];
The getAll() method of the StylePropertyMapReadOnly interface returns an array of CSSStyleValue objects containing the values for the provided property.
Parameters
| Parameter | Type |
|---|---|
property | string |
Returns
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.
Parameters
| Parameter | Type |
|---|---|
property | string |
Returns
boolean
Inherited from
keys()
keys(): StylePropertyMapReadOnlyIterator<string>;
Returns
StylePropertyMapReadOnlyIterator<string>
Inherited from
set()
set(property, ...values): void;
The set() method of the StylePropertyMap interface changes the CSS declaration with the given property.
Parameters
| Parameter | Type |
|---|---|
property | string |
...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.