Style Observer API
    Preparing search index...
    Index

    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.

    renderedObserver: RenderedObserver
    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.

    rootNodes: WeakSet<Document | ShadowRoot> = ...

    All root nodes that have observed elements.

    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