waypoints icon indicating copy to clipboard operation
waypoints copied to clipboard

[Feature] Implement IntersectionObserver for browsers that support it

Open patrick-mcdougle opened this issue 7 years ago • 3 comments

https://hacks.mozilla.org/2017/08/intersection-observer-comes-to-firefox/ https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API

patrick-mcdougle avatar Aug 14 '17 02:08 patrick-mcdougle

Finally native support for this! :)

Nettsentrisk avatar Sep 29 '17 10:09 Nettsentrisk

I might work on this for hacktoberfest. Does anyone have any opinions on if you should have to bring your own polyfill, or if the library should provide it? Perhaps 2 builds? Not sure how to proceed on those fronts.

patrick-mcdougle avatar Sep 30 '17 20:09 patrick-mcdougle

There's a problem with this. The "continuous" option might not be possible. An IntersectionObserverEntry doesn't seem to fire if the scroll somehow passes the waypoint without firing (for example, a scrollbar click, someone calling window.scroll, anchor links, etc...). See my issue on the IntersectionObserver specification https://github.com/w3c/IntersectionObserver/issues/258

patrick-mcdougle avatar Oct 15 '17 01:10 patrick-mcdougle