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
[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:
Let url be the WorkerGlobalScope
object's url.
If url's host is null, return the empty + string.
If url's port is null, return + url's host, serialised.
Return url's host, serialised, followed by ":
" and url's port, serialised.
The hostname
attribute's getter
+ must run these steps:
Let host be the WorkerGlobalScope
object's url's host.
If host is null, return the empty string.
Return host serialised.
The port
attribute's getter must run
+ these steps:
The WorkerLocation
interface supports the URLUtilsReadOnly
- interface.
Let port be the WorkerGlobalScope
object's url's port.
If port is null, return the empty string.
Return port, serialised.
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.
Let url be the WorkerGlobalScope
object's url.
If url's non-relative flag is set, return the first string in + url's path.
Return "/
", followed by the strings in url's path (including empty strings), separated from each other by
+ "/
".
The search
attribute's getter must
+ run these steps:
The element's URLUtilsReadOnly
interface's get the base algorithm must return null.
Let query be the WorkerGlobalScope
object's url's query.
If query is either null or the empty string, return the empty string.
Return "?
", followed by query.
The hash
attribute's getter must run
+ these steps:
Let fragment be the WorkerGlobalScope
object's url's fragment.
If fragment is either null or the empty string, return the empty string.
Return "#
", followed by fragment.