WorkerLocation.origin

The origin property of a WorkerLocation object returns the worker’s origin.

Syntax

string = object.origin;

Examples

// On this page, returns the origin
var result = self.location.origin; // Returns:'https://developer.mozilla.org:443'

Specifications

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

Browser compatibility

BCD tables only load in the browser

See also