Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const options = {
root: null, // use null for viewport
rootMargin: '0px',
threshold: 1.0
const observer = new IntersectionObserver(callback, options);
const target = document.querySelector('#someSection');
function callback(entries, observer) {
// fetch some data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.