PageSourceSearch

https://www.toftaherrgard.se/modules/custom/common/vue/js/lazyLoadWithIntersectionObserver.js?tlygod

js toftaherrgard.se collected 2026-09-26 11:18:42 UTC 333 bytes, 12 lines download raw bytes

1// Load element when in viewport
2
3const lazyInit = (element, fn) => {
4  // console.log("lazyLoadWithIntersectionObserver.js");
5  const observer = new IntersectionObserver((entries) => {
6    if (entries.some(({isIntersecting}) => isIntersecting)) {
7      observer.disconnect();
8      fn();
9    }
10  });
11  observer.observe(element);
12};

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.