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.

Interesting. Do you know what the difference is that led to the worse performance? (I'm not necessarily saying it must have been the same, just trying to understand your use-case better.)

> 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.

Could you explain in more detail what you're doing with this information? Again, just trying to learn and understand the use-case.


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

Received on Tuesday, 30 July 2019 18:57:33 UTC