Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2020.
* Some parts of this feature may have varying levels of support.
The ResizeObserverEntry interface represents the object passed to the ResizeObserver() constructor's callback function, which allows you to access the new dimensions of the Element or SVGElement being observed.
An array of objects containing the new border box size of the observed element when the callback is run.
ResizeObserverEntry.contentBoxSize Read onlyAn array of objects containing the new content box size of the observed element when the callback is run.
ResizeObserverEntry.devicePixelContentBoxSize Read onlyAn array of objects containing the new content box size in device pixels of the observed element when the callback is run.
ResizeObserverEntry.contentRect Read onlyA DOMRectReadOnly object containing the new size of the observed element when the callback is run. Note that this is now a legacy property that is retained in the spec for backward-compatibility reasons only.
ResizeObserverEntry.target Read onlyA reference to the Element or SVGElement being observed.
Note: The content box is the box in which content can be placed, meaning the border box minus the padding and border width. The border box encompasses the content, padding, and border. See The box model for further explanation.
None.
The following snippet is taken from the resize-observer-text.html (see source) example.
Note that the code covers three different compatibility cases:
| Resize Observer # resize-observer-entry-interface |
Enable JavaScript to view this browser compatibility table.
This page was last modified on May 30, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.