add check for intersectionObserver support
This commit is contained in:
parent
8a4503c925
commit
7f1b138304
|
@ -1,5 +1,9 @@
|
|||
(function() {
|
||||
window.addEventListener('DOMContentLoaded', event => {
|
||||
if (!!window.IntersectionObserver) {
|
||||
document.body.classList.add('supports-intersect');
|
||||
}
|
||||
|
||||
function onScreenHandler(entries) {
|
||||
entries.forEach(entry => {
|
||||
if (entry.intersectionRatio > 0) {
|
||||
|
|
Loading…
Reference in New Issue