WorkerLocation: hash property
注意:此功能僅在 Web Workers 中可用。
WorkerLocation 物件的 hash 屬性返回 worker location 的 hash 部分。
值
字串。
示例
js
// In a Web worker, on the page https://mdn.club.tw/en-US/docs/Web/API/WorkerLocation/hash#examples
const result = location.hash; // Returns '#examples'
規範
| 規範 |
|---|
| HTML # dom-workerlocation-hash |
瀏覽器相容性
載入中…
另見
- 它所屬的
WorkerLocation介面。