Resize observer
Widely available since 2023-01-28
The ResizeObserver
API observes and reacts to changes in the size of DOM elements.
Learning resources on MDN
- Resize Observer API
- ResizeObserver: ResizeObserver() constructor
- ResizeObserver: disconnect() method
- ResizeObserver: observe() method
- ResizeObserver: unobserve() method
- ResizeObserverEntry
- ResizeObserverEntry: borderBoxSize property
- ResizeObserverEntry: contentBoxSize property
- ResizeObserverEntry: contentRect property
- ResizeObserverEntry: devicePixelContentBoxSize property
- ResizeObserverEntry: target property
- ResizeObserverSize
- ResizeObserverSize: blockSize property
- ResizeObserverSize: inlineSize property
Browser support (view on caniuse.com)
- Chrome 64 Released on 2018-01-23
- Chrome Android 64 Released on 2018-01-23
- Edge 79 Released on 2020-01-15
- Firefox 69 Released on 2019-09-03
- Firefox for Android 79 Released on 2020-07-28
- Safari 13.1 Released on 2020-03-24
- Safari on iOS 13.4 Released on 2020-03-24