WorkerLocation: href プロパティ

hrefWorkerLocation オブジェクトのプロパティで、ワーカーの位置のシリアライズされた URL の入った文字列を返します。

文字列です。

js
// https://developer.mozilla.org/ja/docs/Web のページにあるウェブワーカーにて
const result = location.href; // 'https://developer.mozilla.org/ja/docs/Web' を返す

仕様書

Specification
HTML
# dom-workerlocation-href

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
href

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

関連情報