WorkerLocation: href 屬性
注意:此功能僅在 Web Workers 中可用。
WorkerLocation 物件的 href 屬性返回一個字串,其中包含工作執行緒位置的序列化 URL。
值
字串。
示例
js
// In a Web worker, on the page https://mdn.club.tw/en-US/docs/Web
const result = location.href; // Returns 'https://mdn.club.tw/en-US/docs/Web'
規範
| 規範 |
|---|
| HTML # dom-workerlocation-href |
瀏覽器相容性
載入中…
另見
- 它所屬的
WorkerLocation介面。