Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is not Baseline because it does not work in some of the most widely-used browsers.
HTMLGeolocationElement() コンストラクターは、新しい HTMLGeolocationElement オブジェクトインスタンスを生成します。
なし。
ブラウザーから内部的に使用された場合は、新しい HTMLGeolocationElement のオブジェクトインスタンス。
開発者は、HTMLGeolocationElement() コンストラクターを直接使用して新しい HTMLGeolocationElement インスタンスを作成することはできません。そうしようとすると、「不正なコンストラクター」エラーが発生します。
新しい HTMLGeolocationElement インスタンスをプログラムで作成するには、コンストラクタを直接使用しようとする代わりに、Document.createElement() を使用して新しい <geolocation> 要素インスタンスを作成します。
その後、DOM に追加することで使用することができます。
| The HTML Geolocation Element # dom-htmlgeolocationelement-constructor |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2026年2月11日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.