1// Service Workerã®ç»é² 2if ('serviceWorker' in navigator) { 3 window.addEventListener('load', () => { 4 const swPath = document.querySelector('link[rel="manifest"]')?.getAttribute('href')?.replace('manifest.json', 'sw.js') || './sw.js'; 5 navigator.serviceWorker.register(swPath).catch((error) => { 6 console.error('Service Worker registration failed:', error); 7 }); 8 }); 9}
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.