The WorkerLocation interface defines the absolute location of the script executed by the Worker.
WorkerLocation
MDN Reference
The hash property of a WorkerLocation object returns the URL.hash part of the worker's location.
hash
The host property of a WorkerLocation object returns the URL.host part of the worker's location.
host
The hostname property of a WorkerLocation object returns the URL.hostname part of the worker's location.
hostname
The href property of a WorkerLocation object returns a string containing the serialized URL for the worker's location.
href
The origin property of a WorkerLocation object returns the worker's URL.origin.
origin
The pathname property of a WorkerLocation object returns the URL.pathname part of the worker's location.
pathname
The port property of a WorkerLocation object returns the URL.port part of the worker's location.
port
The protocol property of a WorkerLocation object returns the URL.protocol part of the worker's location.
protocol
The search property of a WorkerLocation object returns the URL.search part of the worker's location.
search