- From: Yoshisato Yanagisawa <notifications@github.com>
- Date: Sun, 16 Feb 2025 22:30:38 -0800
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 17 February 2025 06:30:42 UTC
yoshisatoyanagisawa left a comment (w3c/ServiceWorker#1712) I guess we are in a different mental model. You might want `addRoutes()` to be a destructive behavior change, while I expect `addRoutes()` as just addition of the behavior. That is why I wrote "allows them to offload simple things ServiceWorkers do" in https://github.com/w3c/ServiceWorker/pull/1701. `addRoutes()` just adds router rules before the default route (i.e. "fetch-event"). When people add routes, it is evaluated and executed before the default route. If no routes are added, it just goes to the default route. If you want to completely skip the fetch handler, you can explicitly add a rule to catch all to go to "network" before the default route. What do you think? -- Reply to this email directly or view it on GitHub: https://github.com/w3c/ServiceWorker/issues/1712#issuecomment-2662175786 You are receiving this because you are subscribed to this thread. Message ID: <w3c/ServiceWorker/issues/1712/2662175786@github.com>
Received on Monday, 17 February 2025 06:30:42 UTC