Constructors

Properties

The callback to call when the element’s style changes.

The observer options.

properties: Map<string, string>

Observed properties to their old values.

target: Element

The element that changed.

all: MultiWeakMap = ...

All instances ever observed by this class.

properties: Set<any> = ...

All properties ever observed by this class.

Accessors

Methods

  • Observe the target for changes to one or more CSS properties.

    Parameters

    • properties: string | string[]

    Returns void

  • Stop observing a target for changes to one or more CSS properties.

    Parameters

    • Optionalproperties: string | string[]

      Properties to stop observing. Defaults to all observed properties.

    Returns void

  • Update the target’s transition property or refresh it if it was overwritten.

    Parameters

    • options: { firstTime?: boolean } = {}
      • OptionalfirstTime?: boolean

        Whether this is the first time the transition is being set.

    Returns void

  • Update the --style-observer-transition property to include all observed properties.

    Returns void