このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

WorkerLocation: hash プロパティ

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.

hashWorkerLocation オブジェクトのプロパティで、ワーカーの位置のハッシュ部分 (hash) を返します。

文字列です。

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

仕様書

Specification
HTML
# dom-workerlocation-hash

ブラウザーの互換性

関連情報