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

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
disconnectChrome Full support 64Edge Full support 79Firefox Full support 69IE No support NoOpera Full support 51Safari Full support 13.1WebView Android Full support 64Chrome Android Full support 64Firefox Android No support NoOpera Android Full support 47Safari iOS Full support 13.4Samsung Internet Android Full support 9.0

Legend

Full support  
Full support
No support  
No support