Re: [w3c/ServiceWorker] ServiceWorker static routing API (PR #1701)

@mkruisselbrink commented on this pull request.



> @@ -3707,6 +3986,28 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
                   1. Return true.
       1. Return false.
   </section>
+
+  <section algorithm>
+    <h3 id="lookup-race-response-algorithm"><dfn export>Lookup Race Response</dfn></h3>
+
+      : Input
+      :: |request|, a [=/request=]
+      : Output
+      :: a [=/response=] or null
+
+      1. If |request|'s [=request/reserved client=] is null, return null.

What you have now looks reasonable to me. I think using request's client's active service worker for non-subresource requests would be incorrect. Maybe at some point we should abstract out a "give me the right registration for this request" algorithm to be shared between Handle Fetch and this algorithm, but for now what you have seems fine too.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1701#discussion_r1498469724
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/pull/1701/review/1894650320@github.com>

Received on Thursday, 22 February 2024 00:25:25 UTC