const SERVICEWORKER_DOC = ` SERVICEWORKER `; const SERVICEWORKER_RESPONSE = new Response(SERVICEWORKER_DOC, { headers: { "content-type": "text/html" }, }); addEventListener("fetch", event => { // Allow utils.js which we explicitly include to be loaded by resetting // interception. if (event.request.url.endsWith("/utils.js")) { return; } event.respondWith(SERVICEWORKER_RESPONSE.clone()); });