PackageTrack

npm · #3711

@juggle/resize-observer

3.4.0juggle/resize-observer

Polyfills the ResizeObserver API and supports box size options from the latest spec

Release timeline

63 releases since 2019
20192020202120222023202420252026

Releases

  1. 4.0.0-41 Aug 2021pre-release

    Nothing published for this version

  2. 4.0.0-31 Aug 2021pre-release

    Nothing published for this version

  3. 4.0.0-231 Jul 2021pre-release

    Nothing published for this version

  4. 4.0.0-131 Jul 2021pre-release

    Nothing published for this version

  5. 3.4.018 Aug 2022
    Release notes

    Aligns polyfill with spec changes.

    Initial value of lastReportedSize changed from 0, 0 to -1, -1 allowing 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

    Open source →
    Release notes

    v3.4.0 Latest

    Latest

    Compare

    Choose a tag to compare

    Open source →
  6. 3.3.128 Apr 2021
    Release notes
    • Fixes an issue where isElement sometimes returns false on elements within an iFrame. Thanks @JayaKrishnaNamburu!
    Open source →
    Release notes

    v3.3.1

    Compare

    Choose a tag to compare

    Open source →
  7. 3.3.024 Feb 2021
    Release notes
    • Reports readonly ResizeObserverSize[] to the observer callback
    • Exposes ResizeObserverSize
    Open source →
    Release notes

    v3.3.0

    Compare

    Choose a tag to compare

    Open source →
  8. 3.2.031 May 2020
    Release notes
    • Fixes issue where calling disconnect would prevent the observer from being used to observe again (#104).
    • Uses time instead of frame counts to capture certain events.
    • Replaces Map with WeakMap
    Open source →
    Release notes

    v3.2.0

    Compare

    Choose a tag to compare

    Open source →
  9. 3.1.33 Apr 2020
    Release notes
    • 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)

    Open source →
    Release notes

    v3.1.3

    Compare

    Choose a tag to compare

    Open source →
  10. 3.1.217 Mar 2020
    Release notes
    • Add missing device-pixel-content-box option to readme.
    Open source →
    Release notes

    v3.1.2

    Compare

    Choose a tag to compare

    Open source →
  11. 3.1.14 Mar 2020
    Release notes
    • Fixes issue where elements observed inside of an IFrame could not be unobserved.
    Open source →
  12. 3.1.028 Feb 2020
    Release notes
    • Support observing elements from other documents (#97)
    • Adds ResizeObserverEntry.toJSON()
    const elFromIFrame = iframe.contentDocument.querySelector('body');
    const ro = new ResizeObserver(() => {
     ...
    });
    ro.observe(elFromIFrame);
    
    Open source →
  13. 3.0.27 Jan 2020
    Release notes
    • Removed next tag
    • Tagged in npm as latest
    Open source →
  14. 3.0.17 Jan 2020

    Nothing published for this version

  15. 3.0.02 Jan 2020
    Release notes

    Updates library to follow the latest specification. This includes some breaking changes from 2.x.

    Breaking changes from 2.x:

    • Updates ResizeObserverEntry to return a sequence of sizes, for future fragment support (#84)
    • Removes default exports and now returns ResizeObserver and ResizeObserverEntry

    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 this rewritten to undefined warning in rollup.
    Open source →
  16. 3.0.0-331 Dec 2019pre-release

    Nothing published for this version

  17. 3.0.0-231 Dec 2019pre-release

    Nothing published for this version

  18. 3.0.0-131 Dec 2019pre-release

    Nothing published for this version

  19. 3.0.0-08 Dec 2019pre-release

    Nothing published for this version

  20. 2.5.030 Nov 2019
    Release notes
    • Adds type=module to package.json.
    • Adds types field to package.json to explicitly locate declaration files.
    • Improves TypeScript usage, when setting observer box option.
    • Improvements to readme.
    Open source →
  21. 2.4.026 Oct 2019
    Release notes
    • Removes RAF overrides
    • Uses micro tasks to schedule recalculations
    Open source →
  22. 2.3.031 Jul 2019
    Release notes
    • Adds safe global object
    • Removes window references
    • Supports loading of library in non-browser environments
    Open source →
  23. 2.2.122 Jul 2019
    Release notes
    • Remove IE transpilation wording from readme
    Open source →
  24. 2.2.015 Jul 2019
    Release notes

    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).
    Open source →
  25. 2.2.0-pre.012 Jul 2019pre-release

    Nothing published for this version

  26. 2.0.314 Jun 2019
    Release notes
    • Add module field to package.json
    Open source →
  27. 2.0.212 Jun 2019
    Release notes
    • Republished version to npm as lib folder was missing. Thanks to @mvsde for spotting this!
    Open source →
  28. 2.0.111 Jun 2019withdrawn: missing lib folder

    Nothing published for this version

  29. 2.0.07 Jun 2019
    Release notes

    Update the shape of the ResizeObserverEntry to 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 contentSize to contentBoxSize.
    Open source →
  30. 1.3.010 Apr 2019
    Release notes

    Fixes issues where animations/transitions were not initially being noticed.

    Open source →
  31. 1.2.028 Mar 2019

    Nothing published for this version

  32. 1.1.225 Mar 2019
    Release notes
    • Update box demo link in docs.
    Open source →
  33. 1.1.121 Feb 2019
    Release notes
    • Fixes an issue that was introduced in v1.1.0 where calculations couldn't initially be scheduled if a requestAnimationFrame loop was being used.
    Open source →
  34. 1.1.021 Feb 2019withdrawn: Version has issues with animation loops, using requestAnimationFrame. Please update to a later version.
    Release notes

    This version improves animation and transition event performance, by removing listeners during processing and calculation checks.

    Open source →
  35. 1.0.116 Feb 2019
    Release notes
    • Updated docs to include box demo
    • Description and keywords updated for npm
    Open source →
  36. 1.0.015 Feb 2019

    Nothing published for this version

  37. 1.0.0-rc.210 Feb 2019pre-release
    Release notes
    • 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.
    Open source →
  38. 1.0.0-rc.16 Feb 2019pre-release
    Release notes
    • Removes inline default exports
    Open source →
  39. 1.0.0-rc.06 Feb 2019pre-release
    Release notes
    • Throws type errors for arguments.
    • Modifies requestAnimationFrame to fire observations at the correct time.
    • Fixes #6, #16 and #28
    Open source →
  40. 0.10.15 Feb 2019

    Nothing published for this version

  41. 0.10.01 Feb 2019

    Nothing published for this version

  42. 0.9.030 Jan 2019
    Release notes
    • Removed ./src folder from npm release
    Open source →
  43. 0.8.030 Jan 2019
    Release notes
    • Code styling rules applied
    • Added explicit license
    Open source →
  44. 0.7.329 Jan 2019

    Nothing published for this version

  45. 0.7.229 Jan 2019

    Nothing published for this version

  46. 0.7.125 Jan 2019
    Release notes

    Fixes:

    • Support adding script in head of document
    Open source →
  47. 0.7.024 Jan 2019
    Release notes

    Includes fixes for: #11, #12, #13

    • Tests separated out into groups
    • Test coverage for initial observations in different element states
    Open source →
  48. 0.6.023 Jan 2019
    Release notes

    Supports latest draft specification https://drafts.csswg.org/resize-observer-1

    • Supports observing different box sizes
    Open source →
  49. 0.5.423 Jan 2019

    Nothing published for this version

  50. 0.5.320 Jan 2019

    Nothing published for this version

  51. 0.5.219 Jan 2019

    Nothing published for this version

  52. 0.5.118 Jan 2019

    Nothing published for this version

  53. 0.5.018 Jan 2019

    Nothing published for this version

  54. 0.4.317 Jan 2019

    Nothing published for this version

  55. 0.4.217 Jan 2019

    Nothing published for this version

  56. 0.4.116 Jan 2019

    Nothing published for this version

  57. 0.4.016 Jan 2019

    Nothing published for this version

  58. 0.3.115 Jan 2019

    Nothing published for this version

  59. 0.3.015 Jan 2019

    Nothing published for this version

  60. 0.2.015 Jan 2019

    Nothing published for this version