Join us online - 19th of November
Save your spot
For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Interface 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

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 (View Summary)

Index
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

  • The append() method of the StylePropertyMap interface adds the passed CSS value to 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 StylePropertyMap interface removes the CSS declaration with the given property.

    MDN Reference

    Parameters

    • property: string

    Returns void

  • The has() method of the StylePropertyMapReadOnly interface indicates whether the specified 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

Was this helpful?