The origin
property of a WorkerLocation
object returns the worker's origin
.
On this page
WorkerLocation: origin property
Value
A string.
Examples
js
// On this page, returns the origin
const result = self.location.origin; // Returns:'https://developer.mozilla.org:443'
Specifications
Specification |
---|
HTML Standard # dom-workerlocation-origin |
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
- The
WorkerLocation
interface it belongs to.
© 2005–2023 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