MDN self-hosted library · e01.org

WorkerLocation: origin property

WorkerLocationworker

Open notebook · 1 cells web-api-instance-property upstream source

WorkerLocationworker

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

Value

A string.

Examples

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

Specifications

Browser compatibility

See also

  • The WorkerLocation interface it belongs to.