Re: [w3c/ServiceWorker] Add a static routing API support. (PR #1686)

@yoshisatoyanagisawa commented on this pull request.



> @@ -3177,6 +3231,41 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
       1. Return |response|.
   </section>
 
+  <section algorithm>
+    <h3 id="verify-router-rule-algorithm"><dfn>VerifyRouterRule</dfn></h3>
+
+      : Input
+      :: |rule|, a {{RouterRule}}
+      : Output
+      :: a boolean
+
+      1. If |rule|["{{RouterRule/condition}}"]["{{RouterCondition/urlPattern}}"] is the empty string, return false.
+      1. Let |urlPattern| be a result of [=urlpattern/parsing=] |rule|["{{RouterRule/condition}}"]["{{RouterCondition/urlPattern}}"]. If a <code>TypeError</code> is thrown, return false.
+      1. [=list/For each=] |part| of |urlPattern|:
+          1. If |part|'s [=urlpattern-part/type=] is "regexp", return false.

done.

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

Message ID: <w3c/ServiceWorker/pull/1686/review/1534066384@github.com>

Received on Tuesday, 18 July 2023 03:17:24 UTC