[csswg-drafts] Position Observer (#9610)

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

== Position Observer ==
I am currently trying to observe the bounding box of a specific node from an extension. It's easy to observe the size changes with the ResizeObserver. But there is no easy way to observe changes in the node position. 

There are imperfect solutions that use IntersectionObserver with rootMargin. See https://samthor.au/2021/observing-dom/ and https://github.com/samthor/viz-observer But there are edge cases where this solution won't work, especially when the element overflows the viewport. 

Instead of misusing IntersectionObserver, or resorting to polling, it would be convenient to have an api that reports changes to the position of an element.


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


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

Received on Friday, 17 November 2023 17:12:23 UTC