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 No support NoFirefox Full support 69IE No support NoOpera Full support 51Safari No support NoWebView Android Full support 64Chrome Android Full support 64Firefox Android No support NoOpera Android Full support 47Safari iOS No support NoSamsung Internet Android Full support Yes

Legend

Full support Ā 
Full support
No support Ā 
No support