hostname

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

MDN Reference