GeolocationPositionError: code プロパティ
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.
安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。
GeolocationPositionError.code
は読み取り専用プロパティで、 unsigned short
でエラーコードを表します。
以下の値になる可能性があります。
値 | 関連づけられた定数 | 説明 |
---|---|---|
1 |
PERMISSION_DENIED |
ページが許可を得ていないために、位置情報の取得に失敗しました。 |
2 |
POSITION_UNAVAILABLE |
1 つまたは複数の位置の内部ソースが内部エラーを返したために、位置情報の取得に失敗しました。 |
3 |
TIMEOUT |
位置情報が制限時間内に取得できませんでした。 |
仕様書
Specification |
---|
Geolocation # code-attribute |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
code |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.