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
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4506,6 +4506,9 @@ 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?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, but actually this wouldn't delay the algorithm. When |raceResponse| is not null, the corresponding request is at least in-flight status. The map in "Lookup Race Response" is a map only contains in-flight requests/responses. At this point in 4.1. Main fetch, the actual fetch is not performed yet, we expect waiting for the in-flight request is faster in most cases.

<li><p>If |raceResponse| is <var>response</var>, return |raceResponse|.
domenic marked this conversation as resolved.
Show resolved Hide resolved

<li>
<p>If <var>response</var> is null, then set <var>response</var> to the result of running the steps
corresponding to the first matching statement:
Expand Down Expand Up @@ -9161,6 +9164,7 @@ Shao-xuan Kang,
Sharath Udupa,
Shivakumar Jagalur Matt,
Shivani Sharma,
宍戸俊哉 (Shunya Shishido),
Sigbjørn Finne,
Simon Pieters,
Simon Sapin,
Expand Down
Loading