You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In w3c/ServiceWorker#1701, the ServiceWorker static routing API uses the match algorithm to match the request URL. However, the original match algorithm accepts a URLPatternInput object, and it does not accept a URL struct. To allow the ServiceWorker static routing API to use the match algorithm, we need to make the match algorithm to accept the URL struct.
Fixes: #218.
Copy file name to clipboardExpand all lines: spec.bs
+11-8Lines changed: 11 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -468,7 +468,7 @@ A <dfn>component</dfn> is a [=struct=] with the following [=struct/items=]:
468
468
</div>
469
469
470
470
<div algorithm>
471
-
To perform a <dfn export for="URL pattern">match</dfn> given a [=URL pattern=] |urlPattern|, a {{URLPatternInput}} |input|, and an optional string |baseURLString|:
471
+
To perform a <dfn export for="URL pattern">match</dfn> given a [=URL pattern=] |urlPattern|, a {{URLPatternInput}}or [=/URL=]|input|, and an optional string |baseURLString|:
472
472
473
473
1. Let |protocol| be the empty string.
474
474
1. Let |username| be the empty string.
@@ -492,13 +492,16 @@ A <dfn>component</dfn> is a [=struct=] with the following [=struct/items=]:
492
492
1. Set |search| to |applyResult|["{{URLPatternInit/search}}"].
493
493
1. Set |hash| to |applyResult|["{{URLPatternInit/hash}}"].
494
494
1. Otherwise:
495
-
1. Let |baseURL| be null.
496
-
1. If |baseURLString| was given, then:
497
-
1. Set |baseURL| to the result of [=URL parser|parsing=] |baseURLString|.
498
-
1. If |baseURL| is failure, return null.
499
-
1. [=list/Append=] |baseURLString| to |inputs|.
500
-
1. Let |url| be the result of [=URL parser|parsing=] |input| given |baseURL|.
501
-
1. If |url| is failure, return null.
495
+
1. Let |url| be |input|.
496
+
1. If |input| is a {{USVString}}:
497
+
1. Let |baseURL| be null.
498
+
1. If |baseURLString| was given, then:
499
+
1. Set |baseURL| to the result of [=URL parser|parsing=] |baseURLString|.
500
+
1. If |baseURL| is failure, return null.
501
+
1. [=list/Append=] |baseURLString| to |inputs|.
502
+
1. Set |url| to the result of [=URL parser|parsing=] |input| given |baseURL|.
0 commit comments