// MyDay shell bootstrap (SPEC-009 §6). Vanilla: no framework, no build step. // // It registers the service worker. The worker itself caches NOTHING but static // assets — an authenticated response and a /{GUID} page are never intercepted // (A5) — see sw.js. // // This file is served same-origin from the reserved `static` workflow, so the // CSP `script-src 'self'` holds. There are no inline scripts anywhere. "use strict"; (function () { if (!("serviceWorker" in navigator)) { return; } window.addEventListener("load", function () { navigator.serviceWorker.register("/static/sw.js", { scope: "/" })["catch"](function () { // A failed registration (an insecure origin, a locked-down browser) is // not fatal: the app is fully server-rendered and works without it. }); }); })();