diff --git a/url.bs b/url.bs index c3a5a435..9e2d5f40 100644 --- a/url.bs +++ b/url.bs @@ -354,8 +354,8 @@ requires context to be distinguished.
The host parser takes a string input, a boolean -isSpecial, and then runs these steps: +
The host parser takes a +string input with a boolean isSpecial, and then runs these steps:
If buffer is the empty string, validation error, return failure. -
Let host be the result of host parsing - buffer with url is special. +
Let host be the result of host parsing buffer with + url is special.
If host is failure, then return failure. @@ -1757,8 +1757,8 @@ string input, optionally with a base URL base, opti string, and either url includes credentials or url's port is non-null, validation error, return. -
Let host be the result of host parsing - buffer with url is special. +
Let host be the result of host parsing buffer with + url is special.
If host is failure, then return failure. @@ -1962,8 +1962,8 @@ string input, optionally with a base URL base, opti
Otherwise, run these steps:
Let host be the result of host parsing - buffer with url is special. +
Let host be the result of host parsing buffer with + url is special.
If host is failure, then return failure. @@ -2609,14 +2609,13 @@ URLPath would be a subclassed Array? -->
Let parsedBase be the result of running the basic URL parser on base. -
If parsedBase is failure, then throw a TypeError
exception.
+
If parsedBase is failure, then throw a {{TypeError}}.
Let parsedURL be the result of running the basic URL parser on url with parsedBase. -
If parsedURL is failure, throw a TypeError
- exception.
+
If parsedURL is failure, throw a {{TypeError}}.
Let query be parsedURL's query, if that is non-null, and the empty string otherwise. @@ -2677,7 +2676,7 @@ url.pathname // "/%F0%9F%8F%B3%EF%B8%8F%E2%80%8D%F0%9F%8C%88"
Let parsedURL be the result of running the basic URL parser on the given value. -
If parsedURL is failure, throw a TypeError
exception.
+
If parsedURL is failure, throw a {{TypeError}}.
Set context object's url to parsedURL. @@ -3066,7 +3065,7 @@ these steps: list name-value pairs with the key being the name and the value being the value. -
The stringification behavior must return the +
The stringification behavior must return the serialization of the {{URLSearchParams}} object's list. @@ -3090,6 +3089,65 @@ e.g., "newURL" and "oldURL". naming. [[!HTML]] +
+[Constructor(USVString host), + Exposed=(Window,Worker)] +interface URLHost { + USVString unicode(); + readonly attribute URLHostType type; + + stringifier USVString toJSON(); +}; + +enum URLHostType { "ipv4", "ipv6", "domain" };+ +
Each {{URLHost}} object has an associated host (a host). + +
The URLHost(input)
constructor, when
+invoked, must run these steps:
+
+
Let host be the result of host parsing input with true. + +
If host is failure, then throw a {{TypeError}}. + +
Return a new {{URLHost}} object whose host is host. +
The unicode()
method, when invoked, must run these
+steps:
+
+
If context object's host is not a domain, then throw + a {{TypeError}}. + +
Let unicodeDomain be the result of running domain to Unicode on + context object's host. + +
Return unicodeDomain, serialized. +
The type
attribute's getter, must run these steps:
+
+
If context object's host is an IPv4 address, then return
+ "ipv4
".
+
+
If context object's host is an IPv6 address, then return
+ "ipv6
".
+
+
Return "domain
".
+
The stringification behavior and
+toJSON()
method, when invoked, must return
+context object's host, serialized.
+
+
This standard is written by