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

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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