w3c / IntersectionObserver

Intersection Observer
https://www.w3.org/TR/intersection-observer/
Other
3.62k stars 526 forks source link

Clarifying how the first callback happens #344

Closed jakearchibald closed 5 years ago

jakearchibald commented 5 years ago

It wasn't immediately clear to me how we always call the observer for a new target. I realised it's because previousThresholdIndex starts as -1, and it'll never calculate to that during the "update intersection observations steps".

I added a note that might make this clearer.


Preview | Diff