Skip to content

Instantly share code, notes, and snippets.

@simbathesailor
Created January 22, 2020 17:42
Show Gist options
  • Save simbathesailor/ec77b87d3a550f3cc085c191f3744340 to your computer and use it in GitHub Desktop.
Save simbathesailor/ec77b87d3a550f3cc085c191f3744340 to your computer and use it in GitHub Desktop.
intersectionobservercallback.js
let callback = (entries, observer) => {
entries.forEach(entry => {
// Each entry describes an intersection change for one observed
// target element:
// entry.boundingClientRect
// entry.intersectionRatio
// entry.intersectionRect
// entry.isIntersecting
// entry.rootBounds
// entry.target
// entry.time
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment