Skip to content

v3.4.0

Latest
Compare
Choose a tag to compare
@TremayneChrist TremayneChrist released this 18 Aug 19:32
· 2 commits to v3 since this release
fb44934

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`.

w3c/csswg-drafts#3664 (comment)