RESOLVED FIXED300729
IntersectionObserver should not notify targets in detached documents
https://bugs.webkit.org/show_bug.cgi?id=300729
Summary IntersectionObserver should not notify targets in detached documents
Stefan Zager
Reported 2025-10-14 14:43:14 PDT
This reverses prior guidance: https://github.com/web-platform-tests/wpt/pull/23308 The spec dictates that IntersectionObserver notifications be generated during the "update the rendering" steps of the document event loop (step 19), but detached documents do not run these steps. Step 3 of "update the rendering" filters non-rendering documents out of the list of documents to update. Hence there is no provision in the spec for IntersectionObserver to run in a detached document. https://html.spec.whatwg.org/#update-the-rendering Test coverage for this issue is provided by wpt/intersection-observer/target-in-detached-document.html, which currently passes in safari: https://wpt.fyi/results/intersection-observer/target-in-detached-document.html?label=master&label=experimental&aligned I plan to land a change to that test which will invert the expectation (i.e. it will assert that IntersectionObserver does not notify a target in a detached document), which will presumably cause the test to start failing in safari. https://chromium-review.googlesource.com/c/chromium/src/+/7038511
Attachments
Radar WebKit Bug Importer
Comment 1 2025-10-15 10:47:02 PDT
Ahmad Saleem
Comment 2 2026-05-23 21:52:07 PDT
EWS
Comment 3 2026-05-25 03:36:11 PDT
Committed 313834@main (b49b5a000685): <https://commits.webkit.org/313834@main> Reviewed commits have been landed. Closing PR #65550 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.