1const registerServiceWorker = async () => { 2 if ('serviceWorker' in navigator) { 3 try { 4 const registration = await navigator.serviceWorker.register('/redirector.js?v=5.0', { 5 scope: '/', 6 type: 'module' 7 }); 8 9 if (registration.installing) { 10 console.log('Service worker installing'); 11 } else if (registration.waiting) { 12 console.log('Service worker installed'); 13 } else if (registration.active) { 14 console.log('Service worker active'); 15 } 16 } catch (error) { 17 console.error(`Registration failed with ${error}`); 18 } 19 } 20}; 21 22registerServiceWorker();
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.