WorkerLocation: origin プロパティ
Baseline
広く利用可能
この機能は広く実装されており、多くのバージョンの端末やブラウザーで動作します。2016年9月以降、すべてのブラウザーで利用可能です。
origin は WorkerLocation オブジェクトのプロパティで、このワーカーのオリジン (origin) を返します。
値
文字列です。
例
js
// On this page, returns the origin
const result = self.location.origin; // 'https://developer.mozilla.org:443' を返す
仕様書
| 仕様書 |
|---|
| HTML> # dom-workerlocation-origin> |
ブラウザーの互換性
関連情報
- 所属先の
WorkerLocation