ResizeObserver

The ResizeObserver interface reports changes to the dimensions of an Element's content or border box, or the bounding box of an SVGElement.

MDN Reference

Constructors

Link copied to clipboard
constructor(callback: ResizeObserverCallback)

Functions

Link copied to clipboard

The disconnect() method of the ResizeObserver interface unobserves all observed Element or SVGElement targets.

Link copied to clipboard
fun observe(target: Element, options: ResizeObserverOptions = definedExternally)

The observe() method of the ResizeObserver interface starts observing the specified Element or SVGElement.

Link copied to clipboard
fun unobserve(target: Element)

The unobserve() method of the ResizeObserver interface ends the observing of a specified Element or SVGElement.