Edit in GitHubLog an issue

window.ResizeObserver

See: ResizeObserver
Since: v8.1

ResizeObserver(callback)

Provides a mechanism to observe changes to the size of an element's content or border box.

ParamTypeDescription
callback
ResizeObserverCallback
The function called whenever a resize event is triggered.

observe(target, [options])

Starts observing the specified target element for size changes.

See: ResizeObserver - observe
Since: v8.1

ParamTypeDefaultDescription
target
Element
The element to be observed.
[options]
Object
{}
Options to configure the observation. Default is { box: "content-box" }.
[options.box]
string
Specifies which box model to observe. Can be "content-box" or "border-box".

unobserve(target)

Stops observing the specified target element.

See: ResizeObserver - unobserve
Since: v8.1

ParamTypeDescription
target
Element
The element to stop observing.

disconnect()

Disconnects the ResizeObserver instance from all observed target elements.

See: ResizeObserver - disconnect
Since: v8.1

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.