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 ObserverThe definition of 'disconnect()' in that specification. | Editor's Draft | Initial definition. |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
disconnect
|
Chrome
Full support 64 |
Edge
Full support 79 |
Firefox
Full support 69 |
IE
No support No |
Opera
Full support 51 |
Safari
Full support 13.1 |
WebView Android
Full support 64 |
Chrome Android
Full support 64 |
Firefox Android
No support No |
Opera Android
Full support 47 |
Safari iOS
Full support 13.4 |
Samsung Internet Android
Full support 9.0 |
Legend
- Full support
- Full support
- No support
- No support
ResizeObserver.disconnect() by Mozilla Contributors is licensed under CC-BY-SA 2.5.