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