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