WorkerLocation.origin

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

Value

A string.

Examples

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

Specifications

Specification
HTML Standard
# dom-workerlocation-origin

Browser compatibility

BCD tables only load in the browser

See also