- From: Yoshisato Yanagisawa <notifications@github.com>
- Date: Wed, 14 Feb 2024 23:07:55 -0800
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 15 February 2024 07:08:01 UTC
@yoshisatoyanagisawa commented on this pull request.
> +
+ <section algorithm>
+ <h3 id="match-router-condition-algorithm"><dfn>Match Router Condition</dfn></h3>
+ : Input
+ :: |condition|, a {{RouterCondition}}
+ :: |serviceWorker|, a [=/service worker=]
+ :: |request|, a [=/request=]
+ : Output
+ :: a boolean
+
+ Note: if there are multiple conditions (e.g. `urlPattern`, `runningStatus`, and `requestMethod` are set), all conditions will be matched to return true.
+
+ 1. If |condition|["{{RouterCondition/urlPattern}}"] [=map/exists=], then:
+ 1. Let |rawPattern| be |condition|["{{RouterCondition/urlPattern}}"].
+ 1. Let |pattern| be the result of running <a>Parse URL Pattern</a> algorithm passing |rawPattern| and |serviceWorker|.
+ 1. If running [=match=] with |pattern| and |request|'s [=request/URL=] returns null, return false.
I also have filed https://github.com/whatwg/urlpattern/issues/218.
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1701#discussion_r1490509454
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/ServiceWorker/pull/1701/review/1881946450@github.com>
Received on Thursday, 15 February 2024 07:08:01 UTC