-
Notifications
You must be signed in to change notification settings - Fork 22.4k
/
index.md
34 lines (22 loc) · 708 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: hash property"
short-title: hash
slug: Web/API/WorkerLocation/hash
page-type: web-api-instance-property
browser-compat: api.WorkerLocation.hash
---
{{ApiRef("WorkerLocation")}}
The **`hash`** property of a {{domxref("WorkerLocation")}} object returns the {{domxref("URL.hash", "hash")}} part of the worker's location.
## Value
A string.
## Examples
```js
// In a Web worker, on the page https://developer.mozilla.org/en-US/docs/Web/API/WorkerLocation/hash#examples
const result = location.hash; // Returns '#examples'
```
## Specifications
{{Specifications}}
## Browser compatibility
{{Compat}}
## See also
- The {{domxref("WorkerLocation")}} interface it belongs to.