The disconnect()
method of the ResizeObserver
interface unobserves all observed Element
or SVGElement
targets.
The disconnect()
method of the ResizeObserver
interface unobserves all observed Element
or SVGElement
targets.
js
disconnect()
None.
None (undefined
).
None.
js
btn.addEventListener("click", () => { resizeObserver.disconnect(); });
Specification |
---|
Resize Observer # dom-resizeobserver-disconnect |
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
disconnect |
64 | 79 | 69 | No | 51 | 13.1 | 64 | 64 | 79 | 47 | 13.4 | 9.0 |
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/disconnect