WorkerLocation

The WorkerLocation interface defines the absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.location property obtained by calling self.location.

MDN Reference

Properties

Link copied to clipboard
external val hash: String

The hash property of a WorkerLocation object returns the hash part of the worker's location.

Link copied to clipboard
external val host: String

The host property of a WorkerLocation object returns the host part of the worker's location.

Link copied to clipboard
external val hostname: String

The hostname property of a WorkerLocation object returns the hostname part of the worker's location.

Link copied to clipboard
external val href: String

The href property of a WorkerLocation object returns a string containing the serialized URL for the worker's location.

Link copied to clipboard
external val origin: String

The origin property of a WorkerLocation object returns the worker's origin.

Link copied to clipboard
external val pathname: String

The pathname property of a WorkerLocation object returns the pathname part of the worker's location.

Link copied to clipboard
external val port: String

The port property of a WorkerLocation object returns the port part of the worker's location.

Link copied to clipboard
external val protocol: String

The protocol property of a WorkerLocation object returns the protocol part of the worker's location.

Link copied to clipboard
external val search: String

The search property of a WorkerLocation object returns the search part of the worker's location.