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

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
origin
38
14
29
No
25
10
38
38
29
25
10
3.0

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/WorkerLocation/origin