From 646b9880b7d510874728d13770fc7e4c1a982c83 Mon Sep 17 00:00:00 2001 From: "Michael[tm] Smith" Date: Fri, 7 May 2021 13:19:21 +0900 Subject: [PATCH] Delete URLUtilsReadOnly docs, redirect to WorkerLocation docs https://github.com/whatwg/html/commit/32a7a20 completely removed the URLUtilsReadOnly interface and moved/inlined/hoisted its properties up into the WorkerLocation interface. So this change deletes all the URLUtilsReadOnly docs, and redirects them to the WorkerLocation docs. --- files/en-us/_redirects.txt | 47 ++--- files/en-us/_wikihistory.json | 178 ++++++++---------- files/en-us/web/api/url_api/index.html | 2 - .../web/api/urlutilsreadonly/hash/index.html | 53 ------ .../web/api/urlutilsreadonly/host/index.html | 54 ------ .../api/urlutilsreadonly/hostname/index.html | 55 ------ .../web/api/urlutilsreadonly/href/index.html | 53 ------ .../en-us/web/api/urlutilsreadonly/index.html | 58 ------ .../api/urlutilsreadonly/origin/index.html | 61 ------ .../api/urlutilsreadonly/pathname/index.html | 55 ------ .../web/api/urlutilsreadonly/port/index.html | 53 ------ .../api/urlutilsreadonly/protocol/index.html | 55 ------ .../api/urlutilsreadonly/search/index.html | 53 ------ .../api/urlutilsreadonly/tostring/index.html | 38 ---- .../web/api/workerlocation/hash/index.html | 49 +++++ .../web/api/workerlocation/host/index.html | 50 +++++ .../api/workerlocation/hostname/index.html | 51 +++++ .../web/api/workerlocation/href/index.html | 50 +++++ files/en-us/web/api/workerlocation/index.html | 47 +++-- .../web/api/workerlocation/origin/index.html | 51 +++++ .../api/workerlocation/pathname/index.html | 50 +++++ .../web/api/workerlocation/port/index.html | 50 +++++ .../api/workerlocation/protocol/index.html | 51 +++++ .../web/api/workerlocation/search/index.html | 50 +++++ .../api/workerlocation/tostring/index.html | 34 ++++ 25 files changed, 615 insertions(+), 733 deletions(-) delete mode 100644 files/en-us/web/api/urlutilsreadonly/hash/index.html delete mode 100644 files/en-us/web/api/urlutilsreadonly/host/index.html delete mode 100644 files/en-us/web/api/urlutilsreadonly/hostname/index.html delete mode 100644 files/en-us/web/api/urlutilsreadonly/href/index.html delete mode 100644 files/en-us/web/api/urlutilsreadonly/index.html delete mode 100644 files/en-us/web/api/urlutilsreadonly/origin/index.html delete mode 100644 files/en-us/web/api/urlutilsreadonly/pathname/index.html delete mode 100644 files/en-us/web/api/urlutilsreadonly/port/index.html delete mode 100644 files/en-us/web/api/urlutilsreadonly/protocol/index.html delete mode 100644 files/en-us/web/api/urlutilsreadonly/search/index.html delete mode 100644 files/en-us/web/api/urlutilsreadonly/tostring/index.html create mode 100644 files/en-us/web/api/workerlocation/hash/index.html create mode 100644 files/en-us/web/api/workerlocation/host/index.html create mode 100644 files/en-us/web/api/workerlocation/hostname/index.html create mode 100644 files/en-us/web/api/workerlocation/href/index.html create mode 100644 files/en-us/web/api/workerlocation/origin/index.html create mode 100644 files/en-us/web/api/workerlocation/pathname/index.html create mode 100644 files/en-us/web/api/workerlocation/port/index.html create mode 100644 files/en-us/web/api/workerlocation/protocol/index.html create mode 100644 files/en-us/web/api/workerlocation/search/index.html create mode 100644 files/en-us/web/api/workerlocation/tostring/index.html diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index 99a2388ffea12fc..60fe40863556038 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -7063,7 +7063,7 @@ /en-US/docs/URI/www and non-www URLs /en-US/docs/Web/HTTP/Basics_of_HTTP/Choosing_between_www_and_non-www_URLs /en-US/docs/URI/www_vs_non-www_URLs /en-US/docs/Web/HTTP/Basics_of_HTTP/Choosing_between_www_and_non-www_URLs /en-US/docs/URL.createObjectURL /en-US/docs/Web/API/URL/createObjectURL -/en-US/docs/URLUtilsReadOnly.origin /en-US/docs/Web/API/URLUtilsReadOnly/origin +/en-US/docs/URLUtilsReadOnly.origin /en-US/docs/Web/API/WorkerLocation/origin /en-US/docs/USA /en-US/docs/Web/Progressive_web_apps /en-US/docs/USA-redirect-1 /en-US/docs/Web/Progressive_web_apps /en-US/docs/USE_EXTENSION_MANIFEST https://github.com/mdn/archived-content/tree/main/files/en-us/mozilla/developer_guide/build_instructions/configuring_build_options @@ -9023,18 +9023,29 @@ /en-US/docs/Web/API/URL.URL /en-US/docs/Web/API/URL/URL /en-US/docs/Web/API/URL.createObjectURL /en-US/docs/Web/API/URL/createObjectURL /en-US/docs/Web/API/URL.revokeObjectURL /en-US/docs/Web/API/URL/revokeObjectURL -/en-US/docs/Web/API/URLReadOnlyUtils.origin /en-US/docs/Web/API/URLUtilsReadOnly/origin +/en-US/docs/Web/API/URLReadOnlyUtils.origin /en-US/docs/Web/API/WorkerLocation/origin /en-US/docs/Web/API/URLUtils/createObjectURL /en-US/docs/Web/API/URL/createObjectURL -/en-US/docs/Web/API/URLUtilsReadOnly.hash /en-US/docs/Web/API/URLUtilsReadOnly/hash -/en-US/docs/Web/API/URLUtilsReadOnly.host /en-US/docs/Web/API/URLUtilsReadOnly/host -/en-US/docs/Web/API/URLUtilsReadOnly.hostname /en-US/docs/Web/API/URLUtilsReadOnly/hostname -/en-US/docs/Web/API/URLUtilsReadOnly.href /en-US/docs/Web/API/URLUtilsReadOnly/href -/en-US/docs/Web/API/URLUtilsReadOnly.origin /en-US/docs/Web/API/URLUtilsReadOnly/origin -/en-US/docs/Web/API/URLUtilsReadOnly.pathname /en-US/docs/Web/API/URLUtilsReadOnly/pathname -/en-US/docs/Web/API/URLUtilsReadOnly.port /en-US/docs/Web/API/URLUtilsReadOnly/port -/en-US/docs/Web/API/URLUtilsReadOnly.protocol /en-US/docs/Web/API/URLUtilsReadOnly/protocol -/en-US/docs/Web/API/URLUtilsReadOnly.search /en-US/docs/Web/API/URLUtilsReadOnly/search -/en-US/docs/Web/API/URLUtilsReadOnly.toString /en-US/docs/Web/API/URLUtilsReadOnly/toString +/en-US/docs/Web/API/URLUtilsReadOnly /en-US/docs/Web/API/WorkerLocation +/en-US/docs/Web/API/URLUtilsReadOnly.hash /en-US/docs/Web/API/WorkerLocation/hash +/en-US/docs/Web/API/URLUtilsReadOnly.host /en-US/docs/Web/API/WorkerLocation/host +/en-US/docs/Web/API/URLUtilsReadOnly.hostname /en-US/docs/Web/API/WorkerLocation/hostname +/en-US/docs/Web/API/URLUtilsReadOnly.href /en-US/docs/Web/API/WorkerLocation/href +/en-US/docs/Web/API/URLUtilsReadOnly.origin /en-US/docs/Web/API/WorkerLocation/origin +/en-US/docs/Web/API/URLUtilsReadOnly.pathname /en-US/docs/Web/API/WorkerLocation/pathname +/en-US/docs/Web/API/URLUtilsReadOnly.port /en-US/docs/Web/API/WorkerLocation/port +/en-US/docs/Web/API/URLUtilsReadOnly.protocol /en-US/docs/Web/API/WorkerLocation/protocol +/en-US/docs/Web/API/URLUtilsReadOnly.search /en-US/docs/Web/API/WorkerLocation/search +/en-US/docs/Web/API/URLUtilsReadOnly.toString /en-US/docs/Web/API/WorkerLocation/toString +/en-US/docs/Web/API/URLUtilsReadOnly/hash /en-US/docs/Web/API/WorkerLocation/hash +/en-US/docs/Web/API/URLUtilsReadOnly/host /en-US/docs/Web/API/WorkerLocation/host +/en-US/docs/Web/API/URLUtilsReadOnly/hostname /en-US/docs/Web/API/WorkerLocation/hostname +/en-US/docs/Web/API/URLUtilsReadOnly/href /en-US/docs/Web/API/WorkerLocation/href +/en-US/docs/Web/API/URLUtilsReadOnly/origin /en-US/docs/Web/API/WorkerLocation/origin +/en-US/docs/Web/API/URLUtilsReadOnly/pathname /en-US/docs/Web/API/WorkerLocation/pathname +/en-US/docs/Web/API/URLUtilsReadOnly/port /en-US/docs/Web/API/WorkerLocation/port +/en-US/docs/Web/API/URLUtilsReadOnly/protocol /en-US/docs/Web/API/WorkerLocation/protocol +/en-US/docs/Web/API/URLUtilsReadOnly/search /en-US/docs/Web/API/WorkerLocation/search +/en-US/docs/Web/API/URLUtilsReadOnly/toString /en-US/docs/Web/API/WorkerLocation/toString /en-US/docs/Web/API/USBDevice/USBDevice.deviceClass /en-US/docs/Web/API/USBDevice/deviceClass /en-US/docs/Web/API/Uint16Array /en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array /en-US/docs/Web/API/Uint32Array /en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array @@ -9328,17 +9339,7 @@ /en-US/docs/Web/API/WorkerGlobalScope/indexedDB /en-US/docs/Web/API/WindowOrWorkerGlobalScope/indexedDB /en-US/docs/Web/API/WorkerGlobalScope/setInterval /en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval /en-US/docs/Web/API/WorkerGlobalScope/setTimeout /en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout -/en-US/docs/Web/API/WorkerLocation.hash /en-US/docs/Web/API/URLUtilsReadOnly/hash -/en-US/docs/Web/API/WorkerLocation/hash /en-US/docs/Web/API/URLUtilsReadOnly/hash -/en-US/docs/Web/API/WorkerLocation/host /en-US/docs/Web/API/URLUtilsReadOnly/host -/en-US/docs/Web/API/WorkerLocation/hostname /en-US/docs/Web/API/URLUtilsReadOnly/hostname -/en-US/docs/Web/API/WorkerLocation/href /en-US/docs/Web/API/URLUtilsReadOnly/href -/en-US/docs/Web/API/WorkerLocation/origin /en-US/docs/Web/API/URLUtilsReadOnly/origin -/en-US/docs/Web/API/WorkerLocation/pathname /en-US/docs/Web/API/URLUtilsReadOnly/pathname -/en-US/docs/Web/API/WorkerLocation/port /en-US/docs/Web/API/URLUtilsReadOnly/port -/en-US/docs/Web/API/WorkerLocation/protocol /en-US/docs/Web/API/URLUtilsReadOnly/protocol -/en-US/docs/Web/API/WorkerLocation/search /en-US/docs/Web/API/URLUtilsReadOnly/search -/en-US/docs/Web/API/WorkerLocation/toString /en-US/docs/Web/API/URLUtilsReadOnly/toString +/en-US/docs/Web/API/WorkerLocation.hash /en-US/docs/Web/API/WorkerLocation/hash /en-US/docs/Web/API/WorkerNavigator/appCodeName /en-US/docs/Web/API/NavigatorID/appCodeName /en-US/docs/Web/API/WorkerNavigator/appName /en-US/docs/Web/API/NavigatorID/appName /en-US/docs/Web/API/WorkerNavigator/appVersion /en-US/docs/Web/API/NavigatorID/appVersion diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index 87d77001a15bb54..aee0012c07312dd 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -84525,101 +84525,6 @@ "teoli" ] }, - "Web/API/URLUtilsReadOnly": { - "modified": "2020-11-13T08:33:28.460Z", - "contributors": [ - "Rumyra", - "alattalatta", - "sideshowbarker", - "Sheppy", - "connorshea", - "chrisdavidmills", - "teoli" - ] - }, - "Web/API/URLUtilsReadOnly/hash": { - "modified": "2020-10-15T21:24:48.282Z", - "contributors": [ - "connorshea", - "Sebastianz", - "teoli", - "kscarfone" - ] - }, - "Web/API/URLUtilsReadOnly/host": { - "modified": "2020-10-15T21:24:47.049Z", - "contributors": [ - "connorshea", - "teoli", - "kscarfone" - ] - }, - "Web/API/URLUtilsReadOnly/hostname": { - "modified": "2020-10-15T21:24:48.709Z", - "contributors": [ - "connorshea", - "teoli", - "namolmes" - ] - }, - "Web/API/URLUtilsReadOnly/href": { - "modified": "2020-10-15T21:24:47.886Z", - "contributors": [ - "chrisdavidmills", - "connorshea", - "teoli", - "namolmes" - ] - }, - "Web/API/URLUtilsReadOnly/origin": { - "modified": "2020-10-15T21:29:33.056Z", - "contributors": [ - "connorshea", - "teoli" - ] - }, - "Web/API/URLUtilsReadOnly/pathname": { - "modified": "2020-11-13T08:37:16.486Z", - "contributors": [ - "Rumyra", - "connorshea", - "teoli", - "namolmes" - ] - }, - "Web/API/URLUtilsReadOnly/port": { - "modified": "2020-10-15T21:24:48.116Z", - "contributors": [ - "connorshea", - "teoli", - "namolmes" - ] - }, - "Web/API/URLUtilsReadOnly/protocol": { - "modified": "2020-10-15T21:24:48.030Z", - "contributors": [ - "connorshea", - "teoli", - "namolmes" - ] - }, - "Web/API/URLUtilsReadOnly/search": { - "modified": "2020-10-15T21:24:48.707Z", - "contributors": [ - "connorshea", - "teoli", - "namolmes" - ] - }, - "Web/API/URLUtilsReadOnly/toString": { - "modified": "2020-10-15T21:24:47.891Z", - "contributors": [ - "sideshowbarker", - "connorshea", - "teoli", - "namolmes" - ] - }, "Web/API/URL_API": { "modified": "2020-12-14T00:08:04.182Z", "contributors": [ @@ -94742,6 +94647,89 @@ "teoli" ] }, + "Web/API/WorkerLocation/hash": { + "modified": "2020-10-15T21:24:48.282Z", + "contributors": [ + "connorshea", + "Sebastianz", + "teoli", + "kscarfone" + ] + }, + "Web/API/WorkerLocation/host": { + "modified": "2020-10-15T21:24:47.049Z", + "contributors": [ + "connorshea", + "teoli", + "kscarfone" + ] + }, + "Web/API/WorkerLocation/hostname": { + "modified": "2020-10-15T21:24:48.709Z", + "contributors": [ + "connorshea", + "teoli", + "namolmes" + ] + }, + "Web/API/WorkerLocation/href": { + "modified": "2020-10-15T21:24:47.886Z", + "contributors": [ + "chrisdavidmills", + "connorshea", + "teoli", + "namolmes" + ] + }, + "Web/API/WorkerLocation/origin": { + "modified": "2020-10-15T21:29:33.056Z", + "contributors": [ + "connorshea", + "teoli" + ] + }, + "Web/API/WorkerLocation/pathname": { + "modified": "2020-11-13T08:37:16.486Z", + "contributors": [ + "Rumyra", + "connorshea", + "teoli", + "namolmes" + ] + }, + "Web/API/WorkerLocation/port": { + "modified": "2020-10-15T21:24:48.116Z", + "contributors": [ + "connorshea", + "teoli", + "namolmes" + ] + }, + "Web/API/WorkerLocation/protocol": { + "modified": "2020-10-15T21:24:48.030Z", + "contributors": [ + "connorshea", + "teoli", + "namolmes" + ] + }, + "Web/API/WorkerLocation/search": { + "modified": "2020-10-15T21:24:48.707Z", + "contributors": [ + "connorshea", + "teoli", + "namolmes" + ] + }, + "Web/API/WorkerLocation/toString": { + "modified": "2020-10-15T21:24:47.891Z", + "contributors": [ + "sideshowbarker", + "connorshea", + "teoli", + "namolmes" + ] + }, "Web/API/WorkerNavigator": { "modified": "2020-10-15T21:24:57.936Z", "contributors": [ diff --git a/files/en-us/web/api/url_api/index.html b/files/en-us/web/api/url_api/index.html index f0d108f5ad5a13e..e420a54cdf796e4 100644 --- a/files/en-us/web/api/url_api/index.html +++ b/files/en-us/web/api/url_api/index.html @@ -74,8 +74,6 @@

URL API interfaces

-

Older versions of the specification included an interface called {{domxref("URLUtilsReadOnly")}}, which has since been merged into the {{domxref("WorkerLocation")}} interface.

-

Examples

If you want to process the parameters included in a URL, you could do it manually, but it's much easier to create a URL object to do it for you. The fillTableWithParameters() function below takes as input a {{domxref("HTMLTableElement")}} object representing a {{HTMLElement("table")}}. Rows are added to the table, one for each key found in the parameters, with the first column containing the key's name, and the second column having the value.

diff --git a/files/en-us/web/api/urlutilsreadonly/hash/index.html b/files/en-us/web/api/urlutilsreadonly/hash/index.html deleted file mode 100644 index 2febda19ae87dc7..000000000000000 --- a/files/en-us/web/api/urlutilsreadonly/hash/index.html +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: URLUtilsReadOnly.hash -slug: Web/API/URLUtilsReadOnly/hash -tags: -- API -- Experimental -- Property -- Read-only -- Reference -- URL API -- URLUtilsReadOnly ---- -

{{ApiRef("URL API")}}{{SeeCompatTable}}

- -

The URLUtilsReadOnly.hash - read-only property returns a {{domxref("DOMString")}} containing a '#' - followed by the fragment identifier of the URL. The hash is not percent encoded.

- -

Syntax

- -
string = object.hash;
- -

Examples

- -
// In a Web worker, on the page https://developer.mozilla.org/en-US/docs/URLUtilsReadOnly.hash#example
-var result = window.self.hash; // Returns:'#hash'
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('URL', '#dom-url-hash', 'URLUtilsReadOnly.hash')}}{{Spec2('URL')}}Initial definition.
- -

Browser compatibility

- -

{{Compat("api.URLUtilsReadOnly.hash")}}

- -

See also

- - diff --git a/files/en-us/web/api/urlutilsreadonly/host/index.html b/files/en-us/web/api/urlutilsreadonly/host/index.html deleted file mode 100644 index 5a4d0000ff976af..000000000000000 --- a/files/en-us/web/api/urlutilsreadonly/host/index.html +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: URLUtilsReadOnly.host -slug: Web/API/URLUtilsReadOnly/host -tags: -- API -- Experimental -- Property -- Read-only -- Reference -- URL API -- URLUtilsReadOnly ---- -

{{ApiRef("URL API")}}{{SeeCompatTable}}

- -

The URLUtilsReadOnly.host - read-only property returns a {{domxref("DOMString")}} containing the host, that is the - hostname, a ':', and the port of the URL.

- -

Syntax

- -
string = object.host;
- -

Examples

- -
// In a Web worker, on the page https://developer.mozilla.org/en-US/URLUtilsReadOnly.host
-var result = window.self.host; // Returns:'developer.mozilla.org:80'
-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('URL', '#dom-url-host', 'URLUtilsReadOnly.host')}}{{Spec2('URL')}}Initial definition.
- -

Browser compatibility

- -

{{Compat("api.URLUtilsReadOnly.host")}}

- -

See also

- - diff --git a/files/en-us/web/api/urlutilsreadonly/hostname/index.html b/files/en-us/web/api/urlutilsreadonly/hostname/index.html deleted file mode 100644 index aeb7d5ba6d7015b..000000000000000 --- a/files/en-us/web/api/urlutilsreadonly/hostname/index.html +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: URLUtilsReadOnly.hostname -slug: Web/API/URLUtilsReadOnly/hostname -tags: -- API -- Experimental -- Property -- Read-only -- URL API -- URLUtilsReadOnly ---- -

{{ApiRef("URL API")}}{{SeeCompatTable}}

- -

The - URLUtilsReadOnly.hostname - read-only property returns a {{domxref("DOMString")}} containing the domain of the - URL.

- -

Syntax

- -
string = object.hostname;
- -

Examples

- -
// In a Web worker, on the page https://developer.mozilla.org/en-US/URLUtilsReadOnly.hostname
-var result = window.self.hostname; // Returns:'developer.mozilla.org'
-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('URL', '#dom-url-hostname', 'URLUtilsReadOnly.hostname')}}{{Spec2('URL')}}Initial definition.
- -

Browser compatibility

- -

{{Compat("api.URLUtilsReadOnly.hostname")}}

- -

See also

- - diff --git a/files/en-us/web/api/urlutilsreadonly/href/index.html b/files/en-us/web/api/urlutilsreadonly/href/index.html deleted file mode 100644 index 5d4fbf87ac3eca1..000000000000000 --- a/files/en-us/web/api/urlutilsreadonly/href/index.html +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: URLUtilsReadOnly.href -slug: Web/API/URLUtilsReadOnly/href -tags: -- API -- Experimental -- Property -- Read-only -- URL API -- URLUtilsReadOnly ---- -

{{ApiRef("URL API")}}{{SeeCompatTable}}

- -

The URLUtilsReadOnly.href - read-only property is a stringifier that returns a {{domxref("DOMString")}} containing - the whole URL.

- -

Syntax

- -
string = object.href;
- -

Examples

- -
// In a Web worker, on the page https://developer.mozilla.org/en-US/URLUtilsReadOnly.href
-var result = window.self.href; // Returns:'https://developer.mozilla.org/en-US/URLUtilsReadOnly.href'
-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('URL', '#dom-url-href', 'URLUtilsReadOnly.href')}}{{Spec2('URL')}}Initial definition.
- -

Browser compatibility

- -

{{Compat("api.URLUtilsReadOnly.href")}}

- -

See also

- - diff --git a/files/en-us/web/api/urlutilsreadonly/index.html b/files/en-us/web/api/urlutilsreadonly/index.html deleted file mode 100644 index 3a27ebbcdb51a73..000000000000000 --- a/files/en-us/web/api/urlutilsreadonly/index.html +++ /dev/null @@ -1,58 +0,0 @@ ---- -title: URLUtilsReadOnly -slug: Web/API/URLUtilsReadOnly -tags: - - API - - Interface - - Obsolete - - Reference - - URL API ---- -

{{ApiRef("URL API")}}{{deprecated_header}}

- -

The obsolete URLUtilsReadOnly interface previously defined utility methods for working with URLs. These were then inherited by other interfaces, such as {{domxref("WorkerLocation")}}. URLUtilsReadOnly has been removed from the specification, and the properties it defined are now directly part of the affected interfaces.

- -

Properties

- -

This interface doesn't inherit any properties.

- -
-
{{domxref("URLUtilsReadOnly.href")}} {{readOnlyInline}}
-
Is a {{domxref("DOMString")}} containing the whole URL.
-
{{domxref("URLUtilsReadOnly.protocol")}} {{readOnlyInline}}
-
Is a {{domxref("DOMString")}} containing the protocol scheme of the URL, including the final ':'.
-
{{domxref("URLUtilsReadOnly.host")}} {{readOnlyInline}}
-
Is a {{domxref("DOMString")}} containing the host, that is the hostname, a ':', and the port of the URL.
-
{{domxref("URLUtilsReadOnly.hostname")}} {{readOnlyInline}}
-
Is a {{domxref("DOMString")}} containing the domain of the URL.
-
{{domxref("URLUtilsReadOnly.origin")}} {{readOnlyInline}}
-
Returns a {{domxref("DOMString")}} containing the canonical form of the origin of the specific location.
-
{{domxref("URLUtilsReadOnly.port")}} {{readOnlyInline}}
-
Is a {{domxref("DOMString")}} containing the port number of the URL.
-
{{domxref("URLUtilsReadOnly.pathname")}} {{readOnlyInline}}
-
Is a {{domxref("USVString")}} containing an initial '/' followed by the path of the URL, not including the query string or fragment.
-
{{domxref("URLUtilsReadOnly.search")}} {{readOnlyInline}}
-
Is a {{domxref("DOMString")}} containing a '?' followed by the parameters of the URL.
-
{{domxref("URLUtilsReadOnly.hash")}} {{readOnlyInline}}
-
Is a {{domxref("DOMString")}} containing a '#' followed by the fragment identifier of the URL.
-
- -

Methods

- -

This interface doesn't inherit any methods.

- -
-
{{domxref("URLUtilsReadOnly.toString()")}}
-
Returns a {{domxref("DOMString")}} containing the whole URL. It is a synonym for {{domxref("URLUtilsReadOnly.href")}}.
-
- -

Browser compatibility

- -

{{Compat("api.URLUtilsReadOnly")}}

- -

See also

- - diff --git a/files/en-us/web/api/urlutilsreadonly/origin/index.html b/files/en-us/web/api/urlutilsreadonly/origin/index.html deleted file mode 100644 index 2ffa089d41404e7..000000000000000 --- a/files/en-us/web/api/urlutilsreadonly/origin/index.html +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: URLUtilsReadOnly.origin -slug: Web/API/URLUtilsReadOnly/origin -tags: -- API -- Experimental -- Property -- Read-only -- URL API -- URLUtilsReadOnly ---- -

{{ApiRef("URL API")}}{{SeeCompatTable}}

- -

The URLUtilsReadOnly.origin - read-only property is a {{domxref("DOMString")}} containing the Unicode serialization - of the origin of the represented URL, that is, for http and https, the scheme followed - by '://', followed by the domain, followed by ':', followed - by the port (the default port, 80 and 443 respectively, if - explicitly specified). For URL using file: scheme, the value is browser - dependant.

- -

This version of origin is implemented by {{domxref("WorkerLocation")}} for - use on workers.

- -

Syntax

- -
string = object.origin;
-
- -

Examples

- -
// On this page, returns the origin
-var result = self.location.origin; // Returns:'https://developer.mozilla.org:443'
-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('URL', '#dom-url-origin', 'URLUtilsReadOnly.origin')}}{{Spec2('URL')}}Initial definition.
- -

Browser compatibility

- -

{{Compat("api.URLUtilsReadOnly.origin")}}

- -

See also

- - diff --git a/files/en-us/web/api/urlutilsreadonly/pathname/index.html b/files/en-us/web/api/urlutilsreadonly/pathname/index.html deleted file mode 100644 index a5b34cc46920d9c..000000000000000 --- a/files/en-us/web/api/urlutilsreadonly/pathname/index.html +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: URLUtilsReadOnly.pathname -slug: Web/API/URLUtilsReadOnly/pathname -tags: -- API -- Experimental -- Property -- Read-only -- URL API -- URLUtilsReadOnly ---- -

{{ApiRef("URL API")}}{{SeeCompatTable}}

- -

The - URLUtilsReadOnly.pathname - read-only property returns a {{domxref("USVString")}} containing an initial - '/' followed by the path of the URL, not including the query string or - fragment.

- -

Syntax

- -
string = object.pathname;
- -

Examples

- -
// In a Web worker, on the page https://developer.mozilla.org/en-US/URLUtilsReadOnly.pathname
-var result = window.self.pathname; // Returns:'/en-US/URLUtilsReadOnly.pathname'
-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('URL', '#dom-url-pathname', 'URLUtilsReadOnly.pathname')}}{{Spec2('URL')}}Initial definition.
- -

Browser compatibility

- -

{{Compat("api.URLUtilsReadOnly.pathname")}}

- -

See also

- - diff --git a/files/en-us/web/api/urlutilsreadonly/port/index.html b/files/en-us/web/api/urlutilsreadonly/port/index.html deleted file mode 100644 index d28f6c2890171ef..000000000000000 --- a/files/en-us/web/api/urlutilsreadonly/port/index.html +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: URLUtilsReadOnly.port -slug: Web/API/URLUtilsReadOnly/port -tags: -- API -- Experimental -- Property -- Read-only -- URL API -- URLUtilsReadOnly ---- -

{{ApiRef("URL API")}}{{SeeCompatTable}}

- -

The URLUtilsReadOnly.port - read-only property returns a {{domxref("DOMString")}} containing the port number of - the URL.

- -

Syntax

- -
string = object.port;
- -

Examples

- -
// In a Web worker, on the page https://developer.mozilla.org/en-US/URLUtilsReadOnly.port
-var result = window.self.port; // Returns:'80'
-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('URL', '#dom-url-port', 'URLUtilsReadOnly.port')}}{{Spec2('URL')}}Initial definition.
- -

Browser compatibility

- -

{{Compat("api.URLUtilsReadOnly.port")}}

- -

See also

- - diff --git a/files/en-us/web/api/urlutilsreadonly/protocol/index.html b/files/en-us/web/api/urlutilsreadonly/protocol/index.html deleted file mode 100644 index bacc85b1bfc45f8..000000000000000 --- a/files/en-us/web/api/urlutilsreadonly/protocol/index.html +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: URLUtilsReadOnly.protocol -slug: Web/API/URLUtilsReadOnly/protocol -tags: -- API -- Experimental -- Property -- Read-only -- URL API -- URLUtilsReadOnly ---- -

{{ApiRef("URL API")}}{{SeeCompatTable}}

- -

The - URLUtilsReadOnly.protocol - read-only property returns a {{domxref("DOMString")}} containing the protocol scheme - of the URL, including the final ':'.

- -

Syntax

- -
string = object.protocol;
- -

Examples

- -
// In a Web worker, on the page https://developer.mozilla.org/en-US/URLUtilsReadOnly.href
-var result = window.self.protocol; // Returns:'https:'
-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('URL', '#dom-url-protocol', 'URLUtilsReadOnly.protocol')}}{{Spec2('URL')}}Initial definition.
- -

Browser compatibility

- -

{{Compat("api.URLUtilsReadOnly.protocol")}}

- -

See also

- - diff --git a/files/en-us/web/api/urlutilsreadonly/search/index.html b/files/en-us/web/api/urlutilsreadonly/search/index.html deleted file mode 100644 index 38ead6c4701cd6c..000000000000000 --- a/files/en-us/web/api/urlutilsreadonly/search/index.html +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: URLUtilsReadOnly.search -slug: Web/API/URLUtilsReadOnly/search -tags: -- API -- Experimental -- Property -- Read-only -- URL API -- URLUtilsReadOnly ---- -

{{ApiRef("URL API")}}{{SeeCompatTable}}

- -

The URLUtilsReadOnly.search - read-only property returns a {{domxref("DOMString")}} containing a '?' - followed by the parameters of the URL.

- -

Syntax

- -
string = object.search;
- -

Examples

- -
// In a Web worker, on the page https://developer.mozilla.org/en-US/docs/URLUtilsReadOnly.href?t=67
-var result = window.self.search; // Returns:'?t=67'
-
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('URL', '#dom-url-search', 'URLUtilsReadOnly.search')}}{{Spec2('URL')}}Initial definition.
- -

Browser compatibility

- -

{{Compat("api.URLUtilsReadOnly.search")}}

- -

See also

- - diff --git a/files/en-us/web/api/urlutilsreadonly/tostring/index.html b/files/en-us/web/api/urlutilsreadonly/tostring/index.html deleted file mode 100644 index 609a0eeda9d7a21..000000000000000 --- a/files/en-us/web/api/urlutilsreadonly/tostring/index.html +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: URLUtilsReadOnly.toString() -slug: Web/API/URLUtilsReadOnly/toString -tags: -- API -- Experimental -- Method -- Stringifier -- URL API -- URLUtilsReadOnly ---- -

{{ApiRef("URL API")}}{{SeeCompatTable}}

- -

The - URLUtilsReadOnly.toString() - stringifier method returns a {{domxref("DOMString")}} containing the whole URL. It is a - synonym for {{domxref("URLUtilsReadOnly.href")}}.

- -

Syntax

- -
string = object.toString();
- -

Examples

- -
// In a Web worker, on the page https://developer.mozilla.org/en-US/URLUtilsReadOnly.href
-var result = window.self.toString(); // Returns:'https://developer.mozilla.org/en-US/URLUtilsReadOnly.href'
-
- -

Browser compatibility

- -

{{Compat("api.URLUtilsReadOnly.toString")}}

- -

See also

- - diff --git a/files/en-us/web/api/workerlocation/hash/index.html b/files/en-us/web/api/workerlocation/hash/index.html new file mode 100644 index 000000000000000..9821ef06c64da99 --- /dev/null +++ b/files/en-us/web/api/workerlocation/hash/index.html @@ -0,0 +1,49 @@ +--- +title: WorkerLocation.hash +slug: Web/API/WorkerLocation/hash +tags: + - API + - Property + - Read-only + - Reference + - WorkerLocation +--- +

{{ApiRef("WorkerLocation")}}

+ +

The hash property of a {{domxref("WorkerLocation")}} object returns the {{domxref("URL.hash", "hash")}} part of the worker’s location.

+ +

Syntax

+ +
string = object.hash;
+ +

Examples

+ +
// In a Web worker, on the page https://developer.mozilla.org/en-US/docs/WorkerLocation.hash#example
+var result = window.self.hash; // Returns:'#hash'
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'workers.html#dom-workerlocation-hash', 'WorkerLocation.hash')}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

Browser compatibility

+ +

{{Compat("api.WorkerLocation.hash")}}

+ +

See also

+ + diff --git a/files/en-us/web/api/workerlocation/host/index.html b/files/en-us/web/api/workerlocation/host/index.html new file mode 100644 index 000000000000000..33f0957174ce41d --- /dev/null +++ b/files/en-us/web/api/workerlocation/host/index.html @@ -0,0 +1,50 @@ +--- +title: WorkerLocation.host +slug: Web/API/WorkerLocation/host +tags: + - API + - Property + - Read-only + - Reference + - WorkerLocation +--- +

{{ApiRef("WorkerLocation")}}

+ +

The host property of a {{domxref("WorkerLocation")}} object returns the {{domxref("URL.host", "host")}} part of the worker’s location.

+ +

Syntax

+ +
string = object.host;
+ +

Examples

+ +
// In a Web worker, on the page https://developer.mozilla.org/en-US/WorkerLocation.host
+var result = window.self.host; // Returns:'developer.mozilla.org:80'
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'workers.html#dom-workerlocation-host', 'WorkerLocation.host')}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

Browser compatibility

+ +

{{Compat("api.WorkerLocation.host")}}

+ +

See also

+ + diff --git a/files/en-us/web/api/workerlocation/hostname/index.html b/files/en-us/web/api/workerlocation/hostname/index.html new file mode 100644 index 000000000000000..1d7b25c443dca1f --- /dev/null +++ b/files/en-us/web/api/workerlocation/hostname/index.html @@ -0,0 +1,51 @@ +--- +title: WorkerLocation.hostname +slug: Web/API/WorkerLocation/hostname +tags: + - API + - Property + - Read-only + - Reference + - WorkerLocation +--- +

{{ApiRef("WorkerLocation")}}

+ +

The hostname property of a {{domxref("WorkerLocation")}} object returns the {{domxref("URL.hostname", "hostname")}} part of the worker’s location.

+ +

Syntax

+ +
string = object.hostname;
+ +

Examples

+ +
// In a Web worker, on the page https://developer.mozilla.org/en-US/WorkerLocation.hostname
+var result = window.self.hostname; // Returns:'developer.mozilla.org'
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'workers.html#dom-workerlocation-hostname', 'WorkerLocation.hostname')}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

Browser compatibility

+ +

{{Compat("api.WorkerLocation.hostname")}}

+ +

See also

+ + diff --git a/files/en-us/web/api/workerlocation/href/index.html b/files/en-us/web/api/workerlocation/href/index.html new file mode 100644 index 000000000000000..5f3dd9429a40b2d --- /dev/null +++ b/files/en-us/web/api/workerlocation/href/index.html @@ -0,0 +1,50 @@ +--- +title: WorkerLocation.href +slug: Web/API/WorkerLocation/href +tags: + - API + - Property + - Read-only + - Reference + - WorkerLocation +--- +

{{ApiRef("WorkerLocation")}}

+ +

The href property of a {{domxref("WorkerLocation")}} object returns a {{domxref("USVString")}} containing the serialized {{domxref("URL")}} for the worker’s location.

+ +

Syntax

+ +
string = object.href;
+ +

Examples

+ +
// In a Web worker, on the page https://developer.mozilla.org/en-US/WorkerLocation.href
+var result = window.self.href; // Returns:'https://developer.mozilla.org/en-US/WorkerLocation.href'
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'workers.html#dom-workerlocation-href', 'WorkerLocation.href')}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

Browser compatibility

+ +

{{Compat("api.WorkerLocation.href")}}

+ +

See also

+ + diff --git a/files/en-us/web/api/workerlocation/index.html b/files/en-us/web/api/workerlocation/index.html index 975dfc666964de3..c6a1d1b3513252f 100644 --- a/files/en-us/web/api/workerlocation/index.html +++ b/files/en-us/web/api/workerlocation/index.html @@ -4,6 +4,7 @@ tags: - API - Web Workers + - Reference ---
{{APIRef("Web Workers API")}}
@@ -13,36 +14,32 @@

Properties

-

The WorkerLocation interface doesn't inherit any property, but implements properties defined in the {{domxref("URLUtilsReadOnly")}} interface.

-
-
{{domxref("URLUtilsReadOnly.href")}} {{readOnlyInline}}
-
Is a stringifier that returns a {{domxref("DOMString")}} containing the whole URL of the script executed in the {{domxref("Worker")}}.
-
{{domxref("URLUtilsReadOnly.protocol")}} {{readOnlyInline}}
-
Is a {{domxref("DOMString")}} containing the protocol scheme of the URL of the script executed in the {{domxref("Worker")}}, including the final ':'.
-
{{domxref("URLUtilsReadOnly.host")}} {{readOnlyInline}}
-
Is a {{domxref("DOMString")}} containing the host, that is the hostname, a ':', and the port of the URL of the script executed in the {{domxref("Worker")}}.
-
{{domxref("URLUtilsReadOnly.hostname")}} {{readOnlyInline}}
-
Is a {{domxref("DOMString")}} containing the domain of the URL of the script executed in the {{domxref("Worker")}}.
-
{{domxref("URLUtilsReadOnly.origin")}} {{readOnlyInline}}
-
Returns a {{domxref("DOMString")}} containing the canonical form of the origin of the specific location.
-
{{domxref("URLUtilsReadOnly.port")}} {{readOnlyInline}}
-
Is a {{domxref("DOMString")}} containing the port number of the URL of the script executed in the {{domxref("Worker")}}.
-
{{domxref("URLUtilsReadOnly.pathname")}} {{readOnlyInline}}
-
Is a {{domxref("USVString")}} containing an initial '/' followed by the path of the URL (not including the query string or fragment) of the script executed in the {{domxref("Worker")}}.
-
{{domxref("URLUtilsReadOnly.search")}} {{readOnlyInline}}
-
Is a {{domxref("DOMString")}} containing a '?' followed by the parameters of the URL of the script executed in the {{domxref("Worker")}}.
-
{{domxref("URLUtilsReadOnly.hash")}} {{readOnlyInline}}
-
Is a {{domxref("DOMString")}} containing a '#' followed by the fragment identifier of the URL of the script executed in the {{domxref("Worker")}}.
+
{{domxref("WorkerLocation.href")}} {{readOnlyInline}}
+
Returns a {{domxref("USVString")}} containing the serialized {{domxref("URL")}} for the worker’s location.
+
{{domxref("WorkerLocation.protocol")}} {{readOnlyInline}}
+
Returns the {{domxref("URL.protocol", "protocol")}} part of the worker’s location.
+
{{domxref("WorkerLocation.host")}} {{readOnlyInline}}
+
Returns the {{domxref("URL.host", "host")}} part of the worker’s location.
+
{{domxref("WorkerLocation.hostname")}} {{readOnlyInline}}
+
Returns the {{domxref("URL.hostname", "hostname")}} part of the worker’s location.
+
{{domxref("WorkerLocation.origin")}} {{readOnlyInline}}
+
Returns the worker’s {{domxref("URL.origin", "origin")}}.
+
{{domxref("WorkerLocation.port")}} {{readOnlyInline}}
+
Returns the {{domxref("URL.port", "port")}} part of the worker’s location.
+
{{domxref("WorkerLocation.pathname")}} {{readOnlyInline}}
+
Returns the {{domxref("URL.pathname", "pathname")}} part of the worker’s location.
+
{{domxref("WorkerLocation.search")}} {{readOnlyInline}}
+
Returns the {{domxref("URL.search", "search")}} part of the worker’s location.
+
{{domxref("WorkerLocation.hash")}} {{readOnlyInline}}
+
Returns the {{domxref("URL.hash", "hash")}} part of the worker’s location.

Methods

-

The WorkerLocation interface doesn't inherit any method, but implements methods defined in the {{domxref("URLUtilsReadOnly")}} interface.

-
-
{{domxref("URLUtilsReadOnly.toString()")}}
-
Returns a {{domxref("DOMString")}} containing the whole URL of the script executed in the {{domxref("Worker")}}. It is a synonym for {{domxref("URLUtilsReadOnly.href")}}.
+
{{domxref("WorkerLocation.toString()")}}
+
Returns a {{domxref("USVString")}} containing the serialized {{domxref("URL")}} for the worker’s location. It is a synonym for {{domxref("WorkerLocation.href")}}.

Specifications

@@ -72,5 +69,5 @@

See also

diff --git a/files/en-us/web/api/workerlocation/origin/index.html b/files/en-us/web/api/workerlocation/origin/index.html new file mode 100644 index 000000000000000..1d9f3ea20971e7b --- /dev/null +++ b/files/en-us/web/api/workerlocation/origin/index.html @@ -0,0 +1,51 @@ +--- +title: WorkerLocation.origin +slug: Web/API/WorkerLocation/origin +tags: + - API + - Property + - Read-only + - Reference + - WorkerLocation +--- +

{{ApiRef("WorkerLocation")}}

+ +

The origin property of a {{domxref("WorkerLocation")}} object returns the worker’s {{domxref("URL.origin", "origin")}}.

+ +

Syntax

+ +
string = object.origin;
+
+ +

Examples

+ +
// On this page, returns the origin
+var result = self.location.origin; // Returns:'https://developer.mozilla.org:443'
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'workers.html#dom-workerlocation', 'WorkerLocation.origin')}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

Browser compatibility

+ +

{{Compat("api.WorkerLocation.origin")}}

+ +

See also

+ + diff --git a/files/en-us/web/api/workerlocation/pathname/index.html b/files/en-us/web/api/workerlocation/pathname/index.html new file mode 100644 index 000000000000000..06a3b8062d6fea4 --- /dev/null +++ b/files/en-us/web/api/workerlocation/pathname/index.html @@ -0,0 +1,50 @@ +--- +title: WorkerLocation.pathname +slug: Web/API/WorkerLocation/pathname +tags: + - API + - Property + - Read-only + - Reference + - WorkerLocation +--- +

{{ApiRef("WorkerLocation")}}

+ +

The pathname property of a {{domxref("WorkerLocation")}} object returns the {{domxref("URL.pathname", "pathname")}} part of the worker’s location.

+ +

Syntax

+ +
string = object.pathname;
+ +

Examples

+ +
// In a Web worker, on the page https://developer.mozilla.org/en-US/WorkerLocation.pathname
+var result = window.self.pathname; // Returns:'/en-US/WorkerLocation.pathname'
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'workers.html#dom-workerlocation-pathname', 'WorkerLocation.pathname')}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

Browser compatibility

+ +

{{Compat("api.WorkerLocation.pathname")}}

+ +

See also

+ + diff --git a/files/en-us/web/api/workerlocation/port/index.html b/files/en-us/web/api/workerlocation/port/index.html new file mode 100644 index 000000000000000..e942c38b5eff3c5 --- /dev/null +++ b/files/en-us/web/api/workerlocation/port/index.html @@ -0,0 +1,50 @@ +--- +title: WorkerLocation.port +slug: Web/API/WorkerLocation/port +tags: + - API + - Property + - Read-only + - Reference + - WorkerLocation +--- +

{{ApiRef("WorkerLocation")}}

+ +

The port property of a {{domxref("WorkerLocation")}} object returns the {{domxref("URL.port", "port")}} part of the worker’s location.

+ +

Syntax

+ +
string = object.port;
+ +

Examples

+ +
// In a Web worker, on the page https://developer.mozilla.org/en-US/WorkerLocation.port
+var result = window.self.port; // Returns:'80'
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'workers.html#dom-workerlocation-port', 'WorkerLocation.port')}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

Browser compatibility

+ +

{{Compat("api.WorkerLocation.port")}}

+ +

See also

+ + diff --git a/files/en-us/web/api/workerlocation/protocol/index.html b/files/en-us/web/api/workerlocation/protocol/index.html new file mode 100644 index 000000000000000..ebadf67a03610c9 --- /dev/null +++ b/files/en-us/web/api/workerlocation/protocol/index.html @@ -0,0 +1,51 @@ +--- +title: WorkerLocation.protocol +slug: Web/API/WorkerLocation/protocol +tags: + - API + - Property + - Read-only + - Reference + - WorkerLocation +--- +

{{ApiRef("WorkerLocation")}}

+ +

The protocol property of a {{domxref("WorkerLocation")}} object returns the {{domxref("URL.protocol", "protocol")}} part of the worker’s location.

+ +

Syntax

+ +
string = object.protocol;
+ +

Examples

+ +
// In a Web worker, on the page https://developer.mozilla.org/en-US/WorkerLocation.href
+var result = window.self.protocol; // Returns:'https:'
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'workers.html#dom-workerlocation-protocol', 'WorkerLocation.protocol')}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

Browser compatibility

+ +

{{Compat("api.WorkerLocation.protocol")}}

+ +

See also

+ + diff --git a/files/en-us/web/api/workerlocation/search/index.html b/files/en-us/web/api/workerlocation/search/index.html new file mode 100644 index 000000000000000..e54229d4fe1b415 --- /dev/null +++ b/files/en-us/web/api/workerlocation/search/index.html @@ -0,0 +1,50 @@ +--- +title: WorkerLocation.search +slug: Web/API/WorkerLocation/search +tags: + - API + - Property + - Read-only + - Reference + - WorkerLocation +--- +

{{ApiRef("WorkerLocation")}}

+ +

The search property of a {{domxref("WorkerLocation")}} object returns the {{domxref("URL.search", "search")}} part of the worker’s location.

+ +

Syntax

+ +
string = object.search;
+ +

Examples

+ +
// In a Web worker, on the page https://developer.mozilla.org/en-US/docs/WorkerLocation.href?t=67
+var result = window.self.search; // Returns:'?t=67'
+
+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'workers.html#dom-workerlocation-search', 'WorkerLocation.search')}}{{Spec2('HTML WHATWG')}}Initial definition.
+ +

Browser compatibility

+ +

{{Compat("api.WorkerLocation.search")}}

+ +

See also

+ + diff --git a/files/en-us/web/api/workerlocation/tostring/index.html b/files/en-us/web/api/workerlocation/tostring/index.html new file mode 100644 index 000000000000000..9da613b9c510bf1 --- /dev/null +++ b/files/en-us/web/api/workerlocation/tostring/index.html @@ -0,0 +1,34 @@ +--- +title: WorkerLocation.toString() +slug: Web/API/WorkerLocation/toString +tags: + - API + - Method + - Stringifier + - Reference + - WorkerLocation +--- +

{{ApiRef("WorkerLocation")}}

+ +

The toString() stringifier method of a {{domxref("WorkerLocation")}} object returns a {{domxref("USVString")}} containing the serialized {{domxref("URL")}} for the worker’s location. It is a synonym for {{domxref("WorkerLocation.href")}}.

+ +

Syntax

+ +
string = object.toString();
+ +

Examples

+ +
// In a Web worker, on the page https://developer.mozilla.org/en-US/WorkerLocation.href
+var result = window.self.toString(); // Returns:'https://developer.mozilla.org/en-US/WorkerLocation.href'
+
+ +

Browser compatibility

+ +

{{Compat("api.WorkerLocation.toString")}}

+ +

See also

+ +