- From: Yoshisato Yanagisawa <notifications@github.com>
- Date: Tue, 15 Aug 2023 02:19:37 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 15 August 2023 09:19:43 UTC
@yoshisatoyanagisawa commented on this pull request.
> +
+ : 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.
+
+ Note: Since running a user-defined regular expression has a security concern, it is prohibited.
+
+ 1. Set |urlPattern| to |rule|["{{RouterRule/condition}}"]["{{RouterCondition/urlPattern}}"]'s associated [=hostname component=].
+ 1. Return true.
+ </section>
Upon your suggestion offline, I have updated the specification to support a full set of URLPattern instead of only pathname. I suppose the comment became obsolete now.
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1686#discussion_r1294367866
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/ServiceWorker/pull/1686/review/1578221738@github.com>
Received on Tuesday, 15 August 2023 09:19:43 UTC