Re: [csswg-drafts] [cssom-view] {element, elements, nodes}FromPoint but without restricting to the viewport clip? (#4122)

> I wanted to respond here as one of the motivating use cases for Emilio bringing this issue up for discussion. I did [try using the Intersection Observer API](https://github.com/mozilla/price-tracker/issues/319#issuecomment-516497169) (I believe v2 based on your description). I saw about a 20% performance improvement compared to the 80% improvement using `elementsFromPoint` described in the same thread.
> 
> My use case differs in a couple of key ways from what seems to be the optimal use case for `IntersectionObserver`:
> 
> 1. We want to check visibility for every single element on the page, not just a handful of say, ads. My sample page had upwards of 6000 elements, which means 6000 observers.
> 2. We only want to check once, not monitor changes over time. It seems like overkill to walk the DOM and attach an observer to each element only to remove it after the first event.



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

Received on Tuesday, 30 July 2019 18:50:50 UTC