Skip to content

Commit e84799f

Browse files
authored
Append the serialization of URL to inputs when performing a match
The list `inputs` is an array of `URLPatternInput` which can only be either a `USVString` or a `URLPatternInit`. To handle the case where a URL is passed through, we need to append the serialization of that URL.
1 parent 20b4d3a commit e84799f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spec.bs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,8 @@ A <dfn>component</dfn> is a [=struct=] with the following [=struct/items=]:
496496
1. Let |search| be the empty string.
497497
1. Let |hash| be the empty string.
498498
1. Let |inputs| be an empty [=list=].
499-
1. [=list/Append=] |input| to |inputs|.
499+
1. If |input| is a [=/URL=], then [=list/append=] the [=URL serializer|serialization=] of |input| to |inputs|.
500+
1. Otherwise, [=list/append=] |input| to |inputs|.
500501
1. If |input| is a {{URLPatternInit}} then:
501502
1. If |baseURLString| was given, throw a {{TypeError}}.
502503
1. Let |applyResult| be the result of [=process a URLPatternInit=] given |input|, "url", |protocol|, |username|, |password|, |hostname|, |port|, |pathname|, |search|, and |hash|. If this throws an exception, catch it, and return null.

0 commit comments

Comments
 (0)