Re: [csswg-drafts] getVisibleClientRect API analogous to getBoundingClientRect (#13294)

DomRect geometry methods? Yes, they would be generally useful.

Would make no difference to this use case. To calculate the clipped rectangle, you'd still have to walk up the parentElement axis clipping the initial Rectangle within clipping ancestors (determining that is tricksy).

Which is what I do already in a big pile of JavaScript using my JavaScript Rectangle class which already has these methods.

It would just be better done by the browser.

The logic is definitely known by the browser vendors since IntersectionObserver must use it.

-- 
GitHub Notification of comment by ExtAnimal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13294#issuecomment-3868219929 using your GitHub account


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

Received on Sunday, 8 February 2026 20:35:10 UTC