diff --git a/source b/source index 64d7cd8095c..eb27e9a49c4 100644 --- a/source +++ b/source @@ -2695,6 +2695,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
  • The fragment component of a parsed URL
  • Parse errors from the URL parser
  • The URL serialiser +
  • The host serialiser +
  • The serialise an integer
  • Default encode set
  • Percent encode
  • UTF-8 percent encode @@ -96313,22 +96315,125 @@ interface WorkerNavigator {};

    Worker locations

    [Exposed=Worker]
    -interface WorkerLocation { };
    -WorkerLocation implements URLUtilsReadOnly;
    +interface WorkerLocation { + stringifier readonly attribute USVString href; + readonly attribute USVString origin; + readonly attribute USVString protocol; + readonly attribute USVString host; + readonly attribute USVString hostname; + readonly attribute USVString port; + readonly attribute USVString pathname; + readonly attribute USVString search; + readonly attribute USVString hash; +};

    A WorkerLocation object represents the WorkerGlobalScope object's - url. + url.

    + +

    The href attribute's getter must + return the WorkerGlobalScope object's url, serialised.

    + +

    The origin attribute's getter must + return the Unicode serialization of the + WorkerGlobalScope object's url's + origin.

    + +

    It returns the Unicode rather than the ASCII serialisation for + compatibility with MessageEvent.

    + +

    The protocol attribute's getter + must run return the WorkerGlobalScope object's url's scheme, followed by ":".

    + +

    The host attribute's getter must run + these steps:

    + +
      +
    1. Let url be the WorkerGlobalScope object's url.

    2. + +
    3. If url's host is null, return the empty + string.

    4. + +
    5. If url's port is null, return + url's host, serialised.

    6. + +
    7. Return url's host, serialised, followed by ":" and url's port, serialised.

    8. +
    + +

    The hostname attribute's getter + must run these steps:

    + +
      +
    1. Let host be the WorkerGlobalScope object's url's host.

    2. + +
    3. If host is null, return the empty string.

    4. + +
    5. Return host serialised.

    6. +
    + +

    The port attribute's getter must run + these steps:

    -

    The WorkerLocation interface supports the URLUtilsReadOnly - interface.

    +
      +
    1. Let port be the WorkerGlobalScope object's url's port.

    2. + +
    3. If port is null, return the empty string.

    4. + +
    5. Return port, serialised.

    6. +
    + +

    The pathname attribute's getter + must run these steps:

    -

    When the object is created, the user agent must invoke the element's - URLUtilsReadOnly interface's set the - input algorithm with the absolute URL that the WorkerLocation - object represents as the given value.

    +
      +
    1. Let url be the WorkerGlobalScope object's url.

    2. + +
    3. If url's non-relative flag is set, return the first string in + url's path.

    4. + +
    5. Return "/", followed by the strings in url's path (including empty strings), separated from each other by + "/".

    6. +
    + +

    The search attribute's getter must + run these steps:

    -

    The element's URLUtilsReadOnly interface's get the base algorithm must return null.

    +
      +
    1. Let query be the WorkerGlobalScope object's url's query.

    2. + +
    3. If query is either null or the empty string, return the empty string.

    4. + +
    5. Return "?", followed by query.

    6. +
    + +

    The hash attribute's getter must run + these steps:

    + +
      +
    1. Let fragment be the WorkerGlobalScope object's url's fragment.

    2. + +
    3. If fragment is either null or the empty string, return the empty string.

    4. + +
    5. Return "#", followed by fragment.

    6. +