You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTML spec needs further changes in IntersectionObserver for proper integration #464
In whatwg/html#6097 I tried to update the HTML spec to use the new terms, but found additional issues.
isIntersecting is not referenceable without referring to that API. Specifying it as an internal slot instead would help. Doing this for all things in the spec might be better than playing whack-a-mole.
HTML initializes a new IntersectionObserver, which requires specifying a callback. Currently, this reads:
The callback is these steps, with arguments entries and observer:
For each entry in entries [ using a method of iteration which does not trigger developer-modifiable array accessors or iteration hooks ] :
So... we need a way to enumerate entries, but without triggering developer-modifiable array accessors or iteration hooks. I'm not entirely sure how to solve this concretely, but maybe @annevk or @domenic can advise?
It would be ideal if HTML didn't initialize JavaScript-facing IntersectionObserver objects at all. Instead there should be algorithms like "add intersection observer steps", which takes a series of spec steps, which HTML can use. Then the IntersectionObserver constructor would call "add intersection observer steps" with the steps being to invoke the provided callback.
Reacted by Anne van Kesteren, Oliver Hader, Jake Archibald and Dominic Farolino
Activity
domenic commentedon Oct 22, 2020
It would be ideal if HTML didn't initialize JavaScript-facing IntersectionObserver objects at all. Instead there should be algorithms like "add intersection observer steps", which takes a series of spec steps, which HTML can use. Then the IntersectionObserver constructor would call "add intersection observer steps" with the steps being to invoke the provided callback.