Polyfills the ResizeObserver API and supports box size options from the latest spec
Last release 4 years ago
no release in 18 months
Ships unpredictably
gaps range from 8 days to 13 months
Some releases are documented
notes for 27 of 49 stable releases
2 versions withdrawn
withdrawn after publishing
8 years old
63 releases · first in 2019
Release timeline
63 releases since 2019Releases
- 4.0.0-41 Aug 2021pre-release
Nothing published for this version
- 4.0.0-31 Aug 2021pre-release
Nothing published for this version
- 4.0.0-231 Jul 2021pre-release
Nothing published for this version
- 4.0.0-131 Jul 2021pre-release
Nothing published for this version
- 3.4.018 Aug 2022
Release notes
Open source →Aligns polyfill with spec changes.
Initial value of
lastReportedSizechanged from0, 0to-1, -1allowing for consistent notifications to be triggered when an element is observed for the first time.const el = document.createElement('div'); const ro = new ResizeObserver(() => { ... }); ro.observe(el); // Will now notify with size `0, 0`.https://github.com/w3c/csswg-drafts/issues/3664#issuecomment-1218270926
- 3.3.128 Apr 2021
Release notes
Open source →- Fixes an issue where
isElementsometimes returns false on elements within an iFrame. Thanks @JayaKrishnaNamburu!
- Fixes an issue where
- 3.3.024 Feb 2021
Release notes
Open source →- Reports readonly
ResizeObserverSize[]to the observer callback - Exposes ResizeObserverSize
- Reports readonly
- 3.2.031 May 2020
Release notes
Open source →- Fixes issue where calling
disconnectwould prevent the observer from being used to observe again (#104). - Uses time instead of frame counts to capture certain events.
- Replaces
MapwithWeakMap
- Fixes issue where calling
- 3.1.33 Apr 2020
Release notes
Open source →- Fixes issue with older versions of chromium. No notifications were fired due to differences in MutationObserver implementation.
Tested:
Chromium 45.0.2454.0 (64-bit) - 3.1.217 Mar 2020
- 3.1.14 Mar 2020
Release notes
Open source →- Fixes issue where elements observed inside of an IFrame could not be unobserved.
- 3.1.028 Feb 2020
Release notes
Open source →- Support observing elements from other documents (#97)
- Adds
ResizeObserverEntry.toJSON()
const elFromIFrame = iframe.contentDocument.querySelector('body'); const ro = new ResizeObserver(() => { ... }); ro.observe(elFromIFrame); - 3.0.27 Jan 2020
- 3.0.17 Jan 2020
Nothing published for this version
- 3.0.02 Jan 2020
Release notes
Open source →Updates library to follow the latest specification. This includes some breaking changes from 2.x.
Breaking changes from 2.x:
- Updates
ResizeObserverEntryto return a sequence of sizes, for future fragment support (#84) - Removes default exports and now returns
ResizeObserverandResizeObserverEntry
Notable improvements:
- Adds UMD bundle for SSR and other CJS loaders (Jest)
- Adds new box option
device-pixel-content-box(#85) - Observes CSS box of root SVG elements (#72)
Other improvements:
- Fix circular dependency - thanks @kei-ito!
- Fix
thisrewritten toundefinedwarning in rollup.
- Updates
- 3.0.0-331 Dec 2019pre-release
Nothing published for this version
- 3.0.0-231 Dec 2019pre-release
Nothing published for this version
- 3.0.0-131 Dec 2019pre-release
Nothing published for this version
- 3.0.0-08 Dec 2019pre-release
Nothing published for this version
- 2.5.030 Nov 2019
Release notes
Open source →- Adds
type=moduletopackage.json. - Adds
typesfield topackage.jsonto explicitly locate declaration files. - Improves TypeScript usage, when setting observer box option.
- Improvements to readme.
- Adds
- 2.4.026 Oct 2019
- 2.3.031 Jul 2019
Release notes
Open source →- Adds safe global object
- Removes
windowreferences - Supports loading of library in non-browser environments
- 2.2.122 Jul 2019
- 2.2.015 Jul 2019
Release notes
Open source →This version includes fixes for many of the Web Platform Tests and pre-transpiles code so that no polyfills or conversion is needed for IE11 and other older browsers.
- No longer observes non-replaced inline elements (#57).
- Supports different writing modes and returns correct values for inline/block sizes (#59).
- Scope change: observer.callback.this = observer (#58).
- Library is now pre-transpiled to ES5. Modules are still ESM (#39).
- 2.2.0-pre.012 Jul 2019pre-release
Nothing published for this version
- 2.0.314 Jun 2019
- 2.0.212 Jun 2019
Release notes
Open source →- Republished version to npm as
libfolder was missing. Thanks to @mvsde for spotting this!
- Republished version to npm as
- 2.0.111 Jun 2019withdrawn: missing lib folder
Nothing published for this version
- 2.0.07 Jun 2019
Release notes
Open source →Update the shape of the
ResizeObserverEntryto match the latest version of the spec.entry = { target: <element>, contentRect: { /* v1 backwards compat */ }, borderBoxSize: { inlineSize, blockSize }, contentBoxSize: { inlineSize, blockSize } }- Removes support for
scroll-box. - Removes support for
device-pixel-border-box. This will be added when/if defined in the spec. - Updates
contentSizetocontentBoxSize.
- Removes support for
- 1.3.010 Apr 2019
Release notes
Open source →Fixes issues where animations/transitions were not initially being noticed.
- 1.2.028 Mar 2019
Nothing published for this version
- 1.1.225 Mar 2019
- 1.1.121 Feb 2019
Release notes
Open source →- Fixes an issue that was introduced in v1.1.0 where calculations couldn't initially be scheduled if a
requestAnimationFrameloop was being used.
- Fixes an issue that was introduced in v1.1.0 where calculations couldn't initially be scheduled if a
- 1.1.021 Feb 2019withdrawn: Version has issues with animation loops, using requestAnimationFrame. Please update to a later version.
Release notes
Open source →This version improves animation and transition event performance, by removing listeners during processing and calculation checks.
- 1.0.116 Feb 2019
Release notes
Open source →- Updated docs to include box demo
- Description and keywords updated for npm
- 1.0.015 Feb 2019
Nothing published for this version
- 1.0.0-rc.210 Feb 2019pre-release
Release notes
Open source →- Fixes issue with resize loop errors on element removal.
- Adds scrollbar width support, enabling correct size information when element has scrollbars.
- Improves function names for debugging.
- 1.0.0-rc.16 Feb 2019pre-release
- 1.0.0-rc.06 Feb 2019pre-release
Release notes
Open source →- Throws type errors for arguments.
- Modifies
requestAnimationFrameto fire observations at the correct time. - Fixes #6, #16 and #28
- 0.10.15 Feb 2019
Nothing published for this version
- 0.10.01 Feb 2019
Nothing published for this version
- 0.9.030 Jan 2019
- 0.8.030 Jan 2019
- 0.7.329 Jan 2019
Nothing published for this version
- 0.7.229 Jan 2019
Nothing published for this version
- 0.7.125 Jan 2019
- 0.7.024 Jan 2019
Release notes
Open source →Includes fixes for: #11, #12, #13
- Tests separated out into groups
- Test coverage for initial observations in different element states
- 0.6.023 Jan 2019
Release notes
Open source →Supports latest draft specification https://drafts.csswg.org/resize-observer-1
- Supports observing different box sizes
- 0.5.423 Jan 2019
Nothing published for this version
- 0.5.320 Jan 2019
Nothing published for this version
- 0.5.219 Jan 2019
Nothing published for this version
- 0.5.118 Jan 2019
Nothing published for this version
- 0.5.018 Jan 2019
Nothing published for this version
- 0.4.317 Jan 2019
Nothing published for this version
- 0.4.217 Jan 2019
Nothing published for this version
- 0.4.116 Jan 2019
Nothing published for this version
- 0.4.016 Jan 2019
Nothing published for this version
- 0.3.115 Jan 2019
Nothing published for this version
- 0.3.015 Jan 2019
Nothing published for this version
- 0.2.015 Jan 2019
Nothing published for this version