Created
January 22, 2020 17:42
-
-
Save simbathesailor/ec77b87d3a550f3cc085c191f3744340 to your computer and use it in GitHub Desktop.
intersectionobservercallback.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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