So the spec says that technically, you're supposed to set isIntersecting to true unconditionally, regardless of threshold:
https://w3c.github.io/IntersectionObserver/#update-intersection-observations-algo:
Let isIntersecting be true if targetRect and rootBounds intersect or are edge-adjacent, even if the intersection has zero area (because rootBounds or targetRect have zero area); otherwise, let isIntersecting be false.
It also says that we should schedule notifications whenever isIntersecting changes, regardless of the threshold change. However that doesn't match browsers, see:
Firefox initially implemented the spec to the letter but had a workaround of sorts to make it similar to other browsers:
Given no browser follows the spec, and that Firefox is pretty close to other browsers, except on the specific value of isIntersecting, I think we should change the spec and Firefox, probably... But it seems kind of an unfortunate situation to be in.
So the spec says that technically, you're supposed to set
isIntersectingtotrueunconditionally, regardless of threshold:https://w3c.github.io/IntersectionObserver/#update-intersection-observations-algo:
It also says that we should schedule notifications whenever
isIntersectingchanges, regardless of the threshold change. However that doesn't match browsers, see:Firefox initially implemented the spec to the letter but had a workaround of sorts to make it similar to other browsers:
Given no browser follows the spec, and that Firefox is pretty close to other browsers, except on the specific value of
isIntersecting, I think we should change the spec and Firefox, probably... But it seems kind of an unfortunate situation to be in.