[csswg-drafts] [resize-observer] In shipping browsers, observe() doesn't call unobserve() (#12902)

iccir has just created a new issue for https://github.com/w3c/csswg-drafts:

== [resize-observer] In shipping browsers, observe() doesn't call unobserve() ==
Per the current spec, `observe(target, options)` is suppose to call `unobserve(target)` if target is already in the `observationTargets`.

From my understanding, this should clear the `lastReportedSizes` array for the target. Hence, even if the target hasn't changed size, re-calling `observe` with the target should always fire an observation.

In practice, all major web browsers do not appear to implement this. Instead, to get the observation to fire, I must manually call `unobserve(target)` first and then call `observe(target)` again.

[In this example](https://jsfiddle.net/a4vz9esf/), adding or removing a column should always trigger an observation. However, it only triggers an observation if I explicitly call `unobserve()` first.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12902 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 3 October 2025 18:26:17 UTC