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

interface StylePropertyMap {
    size: number;
    "[iterator]"(): StylePropertyMapReadOnlyIterator<
        [string, Iterable<CSSStyleValue, any, any>],
    >;
    append(property: string, ...values: (string | CSSStyleValue)[]): void;
    clear(): void;
    delete(property: string): void;
    entries(): StylePropertyMapReadOnlyIterator<
        [string, Iterable<CSSStyleValue, any, any>],
    >;
    forEach(
        callbackfn: (
            value: CSSStyleValue[],
            key: string,
            parent: StylePropertyMapReadOnly,
        ) => void,
        thisArg?: any,
    ): void;
    get(property: string): CSSStyleValue | undefined;
    getAll(property: string): CSSStyleValue[];
    has(property: string): boolean;
    keys(): StylePropertyMapReadOnlyIterator<string>;
    set(property: string, ...values: (string | CSSStyleValue)[]): void;
    values(): StylePropertyMapReadOnlyIterator<
        Iterable<CSSStyleValue, any, any>,
    >;
}
Hierarchy
  • StylePropertyMapReadOnly
    • StylePropertyMap
Index

Properties

size: number

The size read-only property of the containing the size of the StylePropertyMapReadOnly object.

MDN Reference

Methods

  • The append() method of the StylePropertyMap with the given property.

    MDN Reference

    Parameters

    Returns void

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

    MDN Reference

    Returns void

  • The delete() method of the property.

    MDN Reference

    Parameters

    • property: string

    Returns void

  • Parameters

    • callbackfn: (value: CSSStyleValue[], key: string, parent: StylePropertyMapReadOnly) => void
    • OptionalthisArg: any

    Returns void

  • The get() method of the object for the first value of the specified property.

    MDN Reference

    Parameters

    • property: string

    Returns CSSStyleValue | undefined

  • The getAll() method of the js-nolint getAll(property) - property - : The name of the property to retrieve all values of.

    MDN Reference

    Parameters

    • property: string

    Returns CSSStyleValue[]

  • The has() method of the property is in the StylePropertyMapReadOnly object.

    MDN Reference

    Parameters

    • property: string

    Returns boolean

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

    MDN Reference

    Parameters

    Returns void