WorkerLocation Class

https://html.spec.whatwg.org/multipage/workers.html#worker-locations: the URL of a worker.

public sealed class WorkerLocation

Properties

NameDescription
HashGets the fragment of the worker script URL, with its leading number sign, or an empty string.
HostGets the host and the port (when not the default one) of the worker script URL.
HostnameGets the host of the worker script URL.
HrefGets the serialized URL of the worker script.
OriginGets the serialized origin of the worker script URL.
PathnameGets the path of the worker script URL.
PortGets the port of the worker script URL, or an empty string when it is the default one.
ProtocolGets the scheme of the worker script URL followed by a colon.
SearchGets the query of the worker script URL, with its leading question mark, or an empty string.

Gets the fragment of the worker script URL, with its leading number sign, or an empty string.

public string Hash { get; }

Gets the host and the port (when not the default one) of the worker script URL.

public string Host { get; }

Hostname

Worker.cs

Gets the host of the worker script URL.

public string Hostname { get; }

Gets the serialized URL of the worker script.

public string Href { get; }

Origin

Worker.cs

Gets the serialized origin of the worker script URL.

public string Origin { get; }

Pathname

Worker.cs

Gets the path of the worker script URL.

public string Pathname { get; }

Gets the port of the worker script URL, or an empty string when it is the default one.

public string Port { get; }

Protocol

Worker.cs

Gets the scheme of the worker script URL followed by a colon.

public string Protocol { get; }

Methods

NameDescription
ToString()Returns WorkerLocation.Href.

ToString()

Worker.cs
public override string ToString()

Returns

string