-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure "race-network-and-fetch-handler" is used with a fetch handler #1719
Conversation
As covered in https://github.com/WICG/service-worker-static-routing-api?tab=readme-ov-file#how-does-it-work-if-there-is-no-fetch-handler, the fetch handler must exists not only for the "fetch-handler" source but also the "race-network-and-fetch-handler" source. The "race-network-and-fetch-handler" source was not written in the last update.
@domenic @mkruisselbrink Will you take a look? Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks Domenic for the review. |
I think this is a simple spec mistake on the previous edit. Since race-network-and-fetch-handler also depends on the fetch event, having the handler should also be ensured. |
Since the race-network-and-fetch-event source in ServiceWorker static routing API does competition on network and fetch handler, this PR asks the fetch handler to exist on using the source. |
SHA: a14460b Reason: push, by yoshisatoyanagisawa Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SHA: a14460b Reason: push, by pull[bot] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This reflects the change in w3c/ServiceWorker#1719. Instead of silently fallback to network, let me make `addRoutes()` raise if the race-network-and-fetch-handler source is used without having a fetch handler. Fixed: 391990601 Change-Id: Ic944e183286cd056235b0fe272c543533dfaa86f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6211317 Reviewed-by: Takashi Toyoshima <[email protected]> Commit-Queue: Yoshisato Yanagisawa <[email protected]> Reviewed-by: Shunya Shishido <[email protected]> Reviewed-by: Hidehiko Abe <[email protected]> Reviewed-by: Keita Suzuki <[email protected]> Cr-Commit-Position: refs/heads/main@{#1412763}
This reflects the change in w3c/ServiceWorker#1719. Instead of silently fallback to network, let me make `addRoutes()` raise if the race-network-and-fetch-handler source is used without having a fetch handler. Fixed: 391990601 Change-Id: Ic944e183286cd056235b0fe272c543533dfaa86f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6211317 Reviewed-by: Takashi Toyoshima <[email protected]> Commit-Queue: Yoshisato Yanagisawa <[email protected]> Reviewed-by: Shunya Shishido <[email protected]> Reviewed-by: Hidehiko Abe <[email protected]> Reviewed-by: Keita Suzuki <[email protected]> Cr-Commit-Position: refs/heads/main@{#1412763}
This reflects the change in w3c/ServiceWorker#1719. Instead of silently fallback to network, let me make `addRoutes()` raise if the race-network-and-fetch-handler source is used without having a fetch handler. Fixed: 391990601 Change-Id: Ic944e183286cd056235b0fe272c543533dfaa86f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6211317 Reviewed-by: Takashi Toyoshima <[email protected]> Commit-Queue: Yoshisato Yanagisawa <[email protected]> Reviewed-by: Shunya Shishido <[email protected]> Reviewed-by: Hidehiko Abe <[email protected]> Reviewed-by: Keita Suzuki <[email protected]> Cr-Commit-Position: refs/heads/main@{#1412763}
As covered in https://github.com/WICG/service-worker-static-routing-api?tab=readme-ov-file#how-does-it-work-if-there-is-no-fetch-handler, the fetch handler must exists not only for the "fetch-handler" source but also the "race-network-and-fetch-handler" source. The "race-network-and-fetch-handler" source was not written in the last update.
Preview | Diff