-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
34 lines (22 loc) · 658 Bytes
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
title: "WorkerLocation: origin property"
short-title: origin
slug: Web/API/WorkerLocation/origin
page-type: web-api-instance-property
browser-compat: api.WorkerLocation.origin
---
{{ApiRef("WorkerLocation")}}
The **`origin`** property of a {{domxref("WorkerLocation")}} object returns the worker's {{domxref("URL.origin", "origin")}}.
## Value
A string.
## Examples
```js
// On this page, returns the origin
const result = self.location.origin; // Returns:'https://developer.mozilla.org:443'
```
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- The {{domxref("WorkerLocation")}} interface it belongs to.