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

@mkruisselbrink commented on this pull request.



> +                  1. Else:
+                      1. Let |requestResponse| be the first element of |requestResponses|.
+                      1. Let |response| be |requestResponse|'s response.
+                      1. If |activeWorker|'s [=service worker/global object=] is null:
+                          1. If the result of running the [=Setup ServiceWorkerGlobalScope=] algorithm with |activeWorker| is false, then return null.
+
+                          Note: If this step succeeds, then |activeWorker|'s [=relevant settings object=] is now ready to use.
+
+                      1. Let |settingsObject| be |activeWorker|'s [=relevant settings object=].
+                      1. If |response|'s [=response/type=] is "`opaque`", and [=cross-origin resource policy check=] with |settingsObject|'s [=environment settings object/origin=], |settingsObject|, "", and |response|'s [=filtered response/internal response=] returns <b>blocked</b>, then return null.
+                      1. Return |response|.
+              1. Return null.
+          1. Else if |source| is {{RouterSourceEnum/"race-network-and-fetch-handler"}}, and |request|'s [=request/method=] is \`<code>GET</code>\` then:
+              1. Let |queue| be an empty [=queue=] of [=/response=].
+              1. Let |raceFetchController| be null.
+              1. Set |raceResponse|'s [=race response/value=] to "<code>pending</code>".

Ah yes, but does it need to be defined at that level? It's only ever non-null in this "race-network-and-fetch-handler" branch of the algorithm, so it could be entirely local to this branch?

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

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

Received on Wednesday, 21 February 2024 01:26:58 UTC