Skip to content
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

Add ServiceWorker Static Routing API support #1737

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

sisidovski
Copy link

@sisidovski sisidovski commented Feb 16, 2024

We propose ServiceWorker static routing API, which allows developers to configure routing, and offload things ServiceWorkers do. The main spec update is in w3c/ServiceWorker#1701, but some behavior involves the fetch spec change (specifically, "race-network-and-fetch-handler" option).

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

fetch.bs Outdated Show resolved Hide resolved
@sisidovski sisidovski changed the title Support ServiceWorker Static Routing API Add ServiceWorker Static Routing API support Feb 22, 2024
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-editor LGTM

fetch.bs Show resolved Hide resolved
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this return a response without any filtering getting applied? I guess the idea is that these are already filtered responses? Can that be asserted?

@@ -4506,6 +4506,10 @@ steps:

<li><p>If <var>recursive</var> is false, then run the remaining steps <a>in parallel</a>.

<li><p>Let |raceResponse| be the result of <a for=/>lookup race response</a> given <var>request</var>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell https://w3c.github.io/ServiceWorker/#lookup-race-response-algorithm ends up waiting, which would delay this algorithm. Is that really the intent?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants