phuocng / html-dom

Common tasks of managing HTML DOM with vanilla JavaScript. Give me 1 ⭐if it’s useful.
https://phuoc.ng/collection/html-dom
MIT License
6.52k stars 461 forks source link

Add infinite scroller using the IntersectionObserver #118

Open LironHazan opened 4 years ago

LironHazan commented 4 years ago

Add a modern implementation of an infinite scroller using the IntersectionObserver API.

Basically the code example attached to the following post by Surma is a good place to start: https://developers.google.com/web/updates/2016/04/intersectionobserver

Code/demo: https://googlechrome.github.io/samples/intersectionobserver/

phuocng commented 4 years ago

You'll see it 👍

LironHazan commented 4 years ago

@phuoc-ng you're awesome :) I'll open more soon!