ResizeObserver.disconnect()

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

Syntax

resizeObserver.disconnect();

Parameters

None.

Return value

Void.

Exceptions

None.

Examples

btn.addEventListener('click', () => {
  resizeObserver.disconnect();
})

Specifications

Specification Status Comment
Resize Observer
The definition of 'disconnect()' in that specification.
Editor's Draft Initial definition.

Browser compatibility

BCD tables only load in the browser