WorkerLocation.protocol

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

Syntax

string = object.protocol;

Examples

// In a Web worker, on the page https://developer.mozilla.org/en-US/WorkerLocation.href
var result = window.self.protocol; // Returns:'https:'

Specifications

Specification Status Comment
HTML Living Standard
The definition of 'WorkerLocation.protocol' in that specification.
Living Standard Initial definition.

Browser compatibility

BCD tables only load in the browser

See also