From 849854ea2bdc99493fda6a541d6b22665128ef6a Mon Sep 17 00:00:00 2001 From: Shunya Shishido Date: Tue, 25 Mar 2025 02:02:16 +0900 Subject: [PATCH 1/4] Make dummyURL from the basic URL parser with a special scheme --- spec.bs | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/spec.bs b/spec.bs index 9d97980..2b5c9cc 100644 --- a/spec.bs +++ b/spec.bs @@ -1704,7 +1704,8 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a protocol given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be a new [=URL record=]. + 1. Let |dummyInput| be "http://dummy.test". + 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. 1. Let |parseResult| be the result of running the [=basic URL parser=] given |value| followed by "`://dummy.test`", with |dummyURL| as [=basic URL parser/url=].

Note, [=basic URL parser/state override=] is not used here because it enforces restrictions that are only appropriate for the {{URL/protocol}} setter. Instead we use the protocol to parse a dummy URL using the normal parsing entry point.

1. If |parseResult| is failure, then throw a {{TypeError}}. @@ -1715,7 +1716,8 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a username given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be a new [=URL record=]. + 1. Let |dummyInput| be "http://dummy.test". + 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. 1. [=Set the username=] given |dummyURL| and |value|. 1. Return |dummyURL|'s [=url/username=]. @@ -1724,7 +1726,8 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a password given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be a new [=URL record=]. + 1. Let |dummyInput| be "http://dummy.test". + 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. 1. [=Set the password=] given |dummyURL| and |value|. 1. Return |dummyURL|'s [=url/password=]. @@ -1733,7 +1736,8 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a hostname given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be a new [=URL record=]. + 1. Let |dummyInput| be "http://dummy.test". + 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. 1. Let |parseResult| be the result of running the [=basic URL parser=] given |value| with |dummyURL| as [=basic URL parser/url=] and [=hostname state=] as [=basic URL parser/state override=]. 1. If |parseResult| is failure, then throw a {{TypeError}}. 1. Return |dummyURL|'s [=url/host=], [=host serializer|serialized=], or empty string if it is null. @@ -1760,7 +1764,8 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a port given a string |portValue| and optionally a string |protocolValue|: 1. If |portValue| is the empty string, return |portValue|. - 1. Let |dummyURL| be a new [=URL record=]. + 1. Let |dummyInput| be "http://dummy.test". + 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. 1. If |protocolValue| was given, then set |dummyURL|'s [=url/scheme=] to |protocolValue|.

Note, we set the [=URL record=]'s [=url/scheme=] in order for the [=basic URL parser=] to recognize and normalize default port values.

1. Let |parseResult| be the result of running [=basic URL parser=] given |portValue| with |dummyURL| as [=basic URL parser/url=] and [=port state=] as [=basic URL parser/state override=]. @@ -1779,7 +1784,8 @@ To convert a modifier to a string given a [=part/modifier=] |modifier

Note, implementations are free to simply disable slash prepending in their URL parsing code instead of paying the performance penalty of inserting and removing characters in this algorithm. 1. Append |value| to the end of |modified value|. - 1. Let |dummyURL| be a new [=URL record=]. + 1. Let |dummyInput| be "http://dummy.test". + 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. 1. Run [=basic URL parser=] given |modified value| with |dummyURL| as [=basic URL parser/url=] and [=path start state=] as [=basic URL parser/state override=]. 1. Let |result| be the result of [=URL path serializing=] |dummyURL|. 1. If |leading slash| is false, then set |result| to the [=code point substring to the end of the string|code point substring=] from 2 to the end of the string within |result|. @@ -1790,7 +1796,8 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize an opaque pathname given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be a new [=URL record=]. + 1. Let |dummyInput| be "http://dummy.test". + 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. 1. Set |dummyURL|'s [=url/path=] to the empty string. 1. Let |parseResult| be the result of running [=basic URL parser|URL parsing=] given |value| with |dummyURL| as [=basic URL parser/url=] and [=basic URL parser/opaque path state=] as [=basic URL parser/state override=]. 1. If |parseResult| is failure, then throw a {{TypeError}}. @@ -1801,7 +1808,8 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a search given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be a new [=URL record=]. + 1. Let |dummyInput| be "http://dummy.test". + 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. 1. Set |dummyURL|'s [=url/query=] to the empty string. 1. Run [=basic URL parser=] given |value| with |dummyURL| as [=basic URL parser/url=] and [=query state=] as [=basic URL parser/state override=]. 1. Return |dummyURL|'s [=url/query=]. @@ -1811,7 +1819,8 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a hash given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be a new [=URL record=]. + 1. Let |dummyInput| be "http://dummy.test". + 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. 1. Set |dummyURL|'s [=url/fragment=] to the empty string. 1. Run [=basic URL parser=] given |value| with |dummyURL| as [=basic URL parser/url=] and [=fragment state=] as [=basic URL parser/state override=]. 1. Return |dummyURL|'s [=url/fragment=]. From 223a3e2cf2d2d371ffd0559ca2756bbeda9cb3e9 Mon Sep 17 00:00:00 2001 From: Shunya Shishido Date: Tue, 25 Mar 2025 18:43:44 +0900 Subject: [PATCH 2/4] Centralize creating a dummy URL, update the dummy URL string, fix incorrect basic URL parser invocation --- spec.bs | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/spec.bs b/spec.bs index 2b5c9cc..714436b 100644 --- a/spec.bs +++ b/spec.bs @@ -564,6 +564,13 @@ A component is a [=struct=] with the following [=struct/items=]: 1. Return false. +

+ To create a dummy URL: + + 1. Let |dummyInput| be "`https://dummy.invalid/`". + 1. Return the result of running the [=basic URL parser=] on |dummyInput|. +
+

Internals

@@ -1704,20 +1711,17 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a protocol given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyInput| be "http://dummy.test". - 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. - 1. Let |parseResult| be the result of running the [=basic URL parser=] given |value| followed by "`://dummy.test`", with |dummyURL| as [=basic URL parser/url=]. + 1. Let |parseResult| be the result of running the [=basic URL parser=] given |value| followed by "`://dummy.invalid`".

Note, [=basic URL parser/state override=] is not used here because it enforces restrictions that are only appropriate for the {{URL/protocol}} setter. Instead we use the protocol to parse a dummy URL using the normal parsing entry point.

1. If |parseResult| is failure, then throw a {{TypeError}}. - 1. Return |dummyURL|'s [=url/scheme=]. + 1. Return |parseResult|'s [=url/scheme=].
To canonicalize a username given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyInput| be "http://dummy.test". - 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. + 1. Let |dummyURL| be the result of running the [=create a dummy URL=]. 1. [=Set the username=] given |dummyURL| and |value|. 1. Return |dummyURL|'s [=url/username=].
@@ -1726,8 +1730,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a password given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyInput| be "http://dummy.test". - 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. + 1. Let |dummyURL| be the result of running the [=create a dummy URL=]. 1. [=Set the password=] given |dummyURL| and |value|. 1. Return |dummyURL|'s [=url/password=]. @@ -1736,8 +1739,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a hostname given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyInput| be "http://dummy.test". - 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. + 1. Let |dummyURL| be the result of running the [=create a dummy URL=]. 1. Let |parseResult| be the result of running the [=basic URL parser=] given |value| with |dummyURL| as [=basic URL parser/url=] and [=hostname state=] as [=basic URL parser/state override=]. 1. If |parseResult| is failure, then throw a {{TypeError}}. 1. Return |dummyURL|'s [=url/host=], [=host serializer|serialized=], or empty string if it is null. @@ -1764,8 +1766,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a port given a string |portValue| and optionally a string |protocolValue|: 1. If |portValue| is the empty string, return |portValue|. - 1. Let |dummyInput| be "http://dummy.test". - 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. + 1. Let |dummyURL| be the result of running the [=create a dummy URL=]. 1. If |protocolValue| was given, then set |dummyURL|'s [=url/scheme=] to |protocolValue|.

Note, we set the [=URL record=]'s [=url/scheme=] in order for the [=basic URL parser=] to recognize and normalize default port values.

1. Let |parseResult| be the result of running [=basic URL parser=] given |portValue| with |dummyURL| as [=basic URL parser/url=] and [=port state=] as [=basic URL parser/state override=]. @@ -1784,8 +1785,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier

Note, implementations are free to simply disable slash prepending in their URL parsing code instead of paying the performance penalty of inserting and removing characters in this algorithm. 1. Append |value| to the end of |modified value|. - 1. Let |dummyInput| be "http://dummy.test". - 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. + 1. Let |dummyURL| be the result of running the [=create a dummy URL=]. 1. Run [=basic URL parser=] given |modified value| with |dummyURL| as [=basic URL parser/url=] and [=path start state=] as [=basic URL parser/state override=]. 1. Let |result| be the result of [=URL path serializing=] |dummyURL|. 1. If |leading slash| is false, then set |result| to the [=code point substring to the end of the string|code point substring=] from 2 to the end of the string within |result|. @@ -1796,8 +1796,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize an opaque pathname given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyInput| be "http://dummy.test". - 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. + 1. Let |dummyURL| be the result of running the [=create a dummy URL=]. 1. Set |dummyURL|'s [=url/path=] to the empty string. 1. Let |parseResult| be the result of running [=basic URL parser|URL parsing=] given |value| with |dummyURL| as [=basic URL parser/url=] and [=basic URL parser/opaque path state=] as [=basic URL parser/state override=]. 1. If |parseResult| is failure, then throw a {{TypeError}}. @@ -1808,8 +1807,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a search given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyInput| be "http://dummy.test". - 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. + 1. Let |dummyURL| be the result of running the [=create a dummy URL=]. 1. Set |dummyURL|'s [=url/query=] to the empty string. 1. Run [=basic URL parser=] given |value| with |dummyURL| as [=basic URL parser/url=] and [=query state=] as [=basic URL parser/state override=]. 1. Return |dummyURL|'s [=url/query=]. @@ -1819,8 +1817,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a hash given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyInput| be "http://dummy.test". - 1. Let |dummyURL| be the result of running the [=basic URL parser=] on |dummyInput|. + 1. Let |dummyURL| be the result of running the [=create a dummy URL=]. 1. Set |dummyURL|'s [=url/fragment=] to the empty string. 1. Run [=basic URL parser=] given |value| with |dummyURL| as [=basic URL parser/url=] and [=fragment state=] as [=basic URL parser/state override=]. 1. Return |dummyURL|'s [=url/fragment=]. From aa67f692f91adfab4421320864b2c8e3acffed3d Mon Sep 17 00:00:00 2001 From: Shunya Shishido Date: Tue, 25 Mar 2025 22:39:25 +0900 Subject: [PATCH 3/4] Move the create a dummy URL, tweak the invocations --- spec.bs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/spec.bs b/spec.bs index 714436b..e54c7b1 100644 --- a/spec.bs +++ b/spec.bs @@ -564,13 +564,6 @@ A component is a [=struct=] with the following [=struct/items=]: 1. Return false. -

- To create a dummy URL: - - 1. Let |dummyInput| be "`https://dummy.invalid/`". - 1. Return the result of running the [=basic URL parser=] on |dummyInput|. -
-

Internals

@@ -606,6 +599,13 @@ A component is a [=struct=] with the following [=struct/items=]: 1. Return |result|.
+
+ To create a dummy URL: + + 1. Let |dummyInput| be "`https://dummy.invalid/`". + 1. Return the result of running the [=basic URL parser=] on |dummyInput|. +
+ The default options is an [=options=] [=struct=] with [=options/delimiter code point=] set to the empty string and [=options/prefix code point=] set to the empty string. The hostname options is an [=options=] [=struct=] with [=options/delimiter code point=] set "`.`" and [=options/prefix code point=] set to the empty string. @@ -1711,7 +1711,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a protocol given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |parseResult| be the result of running the [=basic URL parser=] given |value| followed by "`://dummy.invalid`". + 1. Let |parseResult| be the result of running the [=basic URL parser=] given |value| followed by "`://dummy.invalid/`".

Note, [=basic URL parser/state override=] is not used here because it enforces restrictions that are only appropriate for the {{URL/protocol}} setter. Instead we use the protocol to parse a dummy URL using the normal parsing entry point.

1. If |parseResult| is failure, then throw a {{TypeError}}. 1. Return |parseResult|'s [=url/scheme=]. @@ -1721,7 +1721,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a username given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be the result of running the [=create a dummy URL=]. + 1. Let |dummyURL| be the result of [=create a dummy URL=]. 1. [=Set the username=] given |dummyURL| and |value|. 1. Return |dummyURL|'s [=url/username=]. @@ -1730,7 +1730,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a password given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be the result of running the [=create a dummy URL=]. + 1. Let |dummyURL| be the result of [=create a dummy URL=]. 1. [=Set the password=] given |dummyURL| and |value|. 1. Return |dummyURL|'s [=url/password=]. @@ -1739,7 +1739,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a hostname given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be the result of running the [=create a dummy URL=]. + 1. Let |dummyURL| be the result of [=create a dummy URL=]. 1. Let |parseResult| be the result of running the [=basic URL parser=] given |value| with |dummyURL| as [=basic URL parser/url=] and [=hostname state=] as [=basic URL parser/state override=]. 1. If |parseResult| is failure, then throw a {{TypeError}}. 1. Return |dummyURL|'s [=url/host=], [=host serializer|serialized=], or empty string if it is null. @@ -1766,7 +1766,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a port given a string |portValue| and optionally a string |protocolValue|: 1. If |portValue| is the empty string, return |portValue|. - 1. Let |dummyURL| be the result of running the [=create a dummy URL=]. + 1. Let |dummyURL| be the result of [=create a dummy URL=]. 1. If |protocolValue| was given, then set |dummyURL|'s [=url/scheme=] to |protocolValue|.

Note, we set the [=URL record=]'s [=url/scheme=] in order for the [=basic URL parser=] to recognize and normalize default port values.

1. Let |parseResult| be the result of running [=basic URL parser=] given |portValue| with |dummyURL| as [=basic URL parser/url=] and [=port state=] as [=basic URL parser/state override=]. @@ -1785,7 +1785,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier

Note, implementations are free to simply disable slash prepending in their URL parsing code instead of paying the performance penalty of inserting and removing characters in this algorithm. 1. Append |value| to the end of |modified value|. - 1. Let |dummyURL| be the result of running the [=create a dummy URL=]. + 1. Let |dummyURL| be the result of [=create a dummy URL=]. 1. Run [=basic URL parser=] given |modified value| with |dummyURL| as [=basic URL parser/url=] and [=path start state=] as [=basic URL parser/state override=]. 1. Let |result| be the result of [=URL path serializing=] |dummyURL|. 1. If |leading slash| is false, then set |result| to the [=code point substring to the end of the string|code point substring=] from 2 to the end of the string within |result|. @@ -1796,7 +1796,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize an opaque pathname given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be the result of running the [=create a dummy URL=]. + 1. Let |dummyURL| be the result of [=create a dummy URL=]. 1. Set |dummyURL|'s [=url/path=] to the empty string. 1. Let |parseResult| be the result of running [=basic URL parser|URL parsing=] given |value| with |dummyURL| as [=basic URL parser/url=] and [=basic URL parser/opaque path state=] as [=basic URL parser/state override=]. 1. If |parseResult| is failure, then throw a {{TypeError}}. @@ -1807,7 +1807,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a search given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be the result of running the [=create a dummy URL=]. + 1. Let |dummyURL| be the result of [=create a dummy URL=]. 1. Set |dummyURL|'s [=url/query=] to the empty string. 1. Run [=basic URL parser=] given |value| with |dummyURL| as [=basic URL parser/url=] and [=query state=] as [=basic URL parser/state override=]. 1. Return |dummyURL|'s [=url/query=]. @@ -1817,7 +1817,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a hash given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be the result of running the [=create a dummy URL=]. + 1. Let |dummyURL| be the result of [=create a dummy URL=]. 1. Set |dummyURL|'s [=url/fragment=] to the empty string. 1. Run [=basic URL parser=] given |value| with |dummyURL| as [=basic URL parser/url=] and [=fragment state=] as [=basic URL parser/state override=]. 1. Return |dummyURL|'s [=url/fragment=]. From 9105e2f049cbb519817704b00becbe73a62dd6a7 Mon Sep 17 00:00:00 2001 From: Shunya Shishido Date: Tue, 25 Mar 2025 23:08:01 +0900 Subject: [PATCH 4/4] create => creating --- spec.bs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spec.bs b/spec.bs index e54c7b1..a500313 100644 --- a/spec.bs +++ b/spec.bs @@ -1721,7 +1721,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a username given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be the result of [=create a dummy URL=]. + 1. Let |dummyURL| be the result of [=creating a dummy URL=]. 1. [=Set the username=] given |dummyURL| and |value|. 1. Return |dummyURL|'s [=url/username=]. @@ -1730,7 +1730,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a password given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be the result of [=create a dummy URL=]. + 1. Let |dummyURL| be the result of [=creating a dummy URL=]. 1. [=Set the password=] given |dummyURL| and |value|. 1. Return |dummyURL|'s [=url/password=]. @@ -1739,7 +1739,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a hostname given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be the result of [=create a dummy URL=]. + 1. Let |dummyURL| be the result of [=creating a dummy URL=]. 1. Let |parseResult| be the result of running the [=basic URL parser=] given |value| with |dummyURL| as [=basic URL parser/url=] and [=hostname state=] as [=basic URL parser/state override=]. 1. If |parseResult| is failure, then throw a {{TypeError}}. 1. Return |dummyURL|'s [=url/host=], [=host serializer|serialized=], or empty string if it is null. @@ -1766,7 +1766,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a port given a string |portValue| and optionally a string |protocolValue|: 1. If |portValue| is the empty string, return |portValue|. - 1. Let |dummyURL| be the result of [=create a dummy URL=]. + 1. Let |dummyURL| be the result of [=creating a dummy URL=]. 1. If |protocolValue| was given, then set |dummyURL|'s [=url/scheme=] to |protocolValue|.

Note, we set the [=URL record=]'s [=url/scheme=] in order for the [=basic URL parser=] to recognize and normalize default port values.

1. Let |parseResult| be the result of running [=basic URL parser=] given |portValue| with |dummyURL| as [=basic URL parser/url=] and [=port state=] as [=basic URL parser/state override=]. @@ -1785,7 +1785,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier

Note, implementations are free to simply disable slash prepending in their URL parsing code instead of paying the performance penalty of inserting and removing characters in this algorithm. 1. Append |value| to the end of |modified value|. - 1. Let |dummyURL| be the result of [=create a dummy URL=]. + 1. Let |dummyURL| be the result of [=creating a dummy URL=]. 1. Run [=basic URL parser=] given |modified value| with |dummyURL| as [=basic URL parser/url=] and [=path start state=] as [=basic URL parser/state override=]. 1. Let |result| be the result of [=URL path serializing=] |dummyURL|. 1. If |leading slash| is false, then set |result| to the [=code point substring to the end of the string|code point substring=] from 2 to the end of the string within |result|. @@ -1796,7 +1796,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize an opaque pathname given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be the result of [=create a dummy URL=]. + 1. Let |dummyURL| be the result of [=creating a dummy URL=]. 1. Set |dummyURL|'s [=url/path=] to the empty string. 1. Let |parseResult| be the result of running [=basic URL parser|URL parsing=] given |value| with |dummyURL| as [=basic URL parser/url=] and [=basic URL parser/opaque path state=] as [=basic URL parser/state override=]. 1. If |parseResult| is failure, then throw a {{TypeError}}. @@ -1807,7 +1807,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a search given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be the result of [=create a dummy URL=]. + 1. Let |dummyURL| be the result of [=creating a dummy URL=]. 1. Set |dummyURL|'s [=url/query=] to the empty string. 1. Run [=basic URL parser=] given |value| with |dummyURL| as [=basic URL parser/url=] and [=query state=] as [=basic URL parser/state override=]. 1. Return |dummyURL|'s [=url/query=]. @@ -1817,7 +1817,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier To canonicalize a hash given a string |value|: 1. If |value| is the empty string, return |value|. - 1. Let |dummyURL| be the result of [=create a dummy URL=]. + 1. Let |dummyURL| be the result of [=creating a dummy URL=]. 1. Set |dummyURL|'s [=url/fragment=] to the empty string. 1. Run [=basic URL parser=] given |value| with |dummyURL| as [=basic URL parser/url=] and [=fragment state=] as [=basic URL parser/state override=]. 1. Return |dummyURL|'s [=url/fragment=].