waypoints
waypoints copied to clipboard
[Feature] Implement IntersectionObserver for browsers that support it
https://hacks.mozilla.org/2017/08/intersection-observer-comes-to-firefox/ https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
Finally native support for this! :)
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.
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