WorkerLocation: port プロパティ
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
port
は WorkerLocation
オブジェクトのプロパティで、このワーカーの位置のポート番号 (port
) 部分を返します。
値
文字列です。
例
js
// http://localhost:8080/ のページにあるウェブワーカーにて
const result = location.port; // '8080' を返す
仕様書
Specification |
---|
HTML # dom-workerlocation-port |
ブラウザーの互換性
関連情報
- 所属先の
WorkerLocation