Re: [w3c/ServiceWorker] Declarative routing (#1373)

I think this behavior is WAI. If you call `importScripts()` on a script before your own `install` handler, you are giving that script priority to install routes.

If you would like to have your own code take priority, then you should rearrange `sw.js` like so:

```js
addEventListener('install', (event) => {
  event.registerRouter(/* ... */);
});

importScripts('b.com/imported-sw.js');
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1373#issuecomment-1670685222
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/issues/1373/1670685222@github.com>

Received on Wednesday, 9 August 2023 05:15:42 UTC