WorkerLocation: origin property
WorkerLocationworker
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.