1export class EventThrottle { 2 static scrollWait = false; 3 static resizeTimer = null; 4 5 static init() { 6 if (typeof scrollEvent === 'function') { 7 window.addEventListener('scroll', (event) => { 8 if (!EventThrottle.scrollWait) { 9 EventThrottle.scrollWait = true; 10 setTimeout((event) => EventThrottle.scrollWait = scrollEvent(event), 200, event); 11 } 12 }, { 13 capture: true, 14 passive: true, 15 }); 16 } 17 18 if (typeof loadEvent === 'function') { 19 window.addEventListener('load', loadEvent, { 20 capture: true, 21 passive: true, 22 }); 23 } 24 25 if (typeof resizeEvent === 'function') { 26 window.addEventListener('resize', (event) => { 27 clearTimeout(EventThrottle.resizeTimer); 28 EventThrottle.resizeTimer = setTimeout(resizeEvent, 500, event); 29 }, { 30 capture: true, 31 passive: true, 32 }); 33 } 34 35 if (typeof readyEvent === 'function') { 36 document.addEventListener('DOMContentLoaded', readyEvent, { 37 capture: true, 38 passive: true, 39 }); 40 } 41 } 42} 43 44EventThrottle.init();
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.