1let elements = document.querySelectorAll('.animate_observer') 2 3// Check for broswer support. If none, reset elements waiting for observer. 4if (window.IntersectionObserver) { 5 6 function observer_callback(e) { 7 e.forEach(function (item, index) { 8 if (e[index].isIntersecting) { 9 e[index].target.style.animationPlayState = 'running'; 10 } 11 }) 12 } 13 14 let observer = new IntersectionObserver(observer_callback, {threshold:0.5}); 15 elements.forEach(function (item, index) { 16 observer.observe(item) 17 }) 18 19} 20 21else { 22 23 elements.forEach(function (item, index) { 24 console.log(item) 25 item.style.animation = 'none' 26 }) 27 28}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.