window.navigator
警告:: この記事の内容は古くなっている可能性があります。
概要
navigator オブジェクトへの参照を返します。 navigator オブジェクトを用いることで、スクリプトを実行しているアプリケーションについての情報を得ることができます。
例
プロパティ
- 現在のブラウザの内部 "コード" ネームを返す(※このプロパティは正確な値を返すとは限りません)
- ブラウザの正式名称を返す(※このプロパティは正確な値を返すとは限りません)
- ブラウザのバージョンを表す文字列を返す(※このプロパティは正確な値を返すとは限りません)
- ブラウザのビルド識別子を返す(※例: "2006090803")
- Provides information about the network connection of a device.
- ブラウザのクッキーが有効かどうかを示す真偽値を返す
- Reports the value of the user's do-not-track preference. When this value is "yes", your web site or application should not track the user.
- Returns the
id
object which you can use to add support for BrowserID to your web site. - ブラウザの言語バージョンを表す文字列を返す
- ブラウザがサポートしている MIME タイプの一覧を返す
- Returns an
Apps
object you can use to install, manage, and control Open Web apps. - Returns a
battery
object you can use to get information about the battery charging status. - Returns a
notification
object you can use to deliver notifications to the user from your web application. - Returns a
SmsManager
object you can use to manage SMS messaging in your web application. - {{todo}}
- Returns a
Telephony
object you can use to create and manage telephone calls. - ブラウザがオンラインで動作しているかどうかを示す真偽値を返す
- 現在のオペレーティングシステムを表す文字列を返す
- ブラウザのプラットフォームを表す文字列を返す
- ブラウザにインストールされているプラグインの一覧を配列で返す
- 現在のブラウザの製品名を返す(※例:"Gecko")
- 現在のブラウザのビルド番号を返します(※例:"20060909")
- 空文字列を返す(※Netscape 4.7x のみ "US & CA domestic policy" または、 "Export policy" という文字列を返す)
- Returns a boolean indicating whether the browser is running in standalone mode. Available on Apple's iOS Safari only.
- 現在のブラウザのユーザエージェントを表す文字列を返す
- 現在のブラウザのベンダー名を返す(※例:"Netscape6")
- ベンダーバージョン番号を返す(※例:"6.1")
- Returns a PointerLock object for the Mouse Lock API.
メソッド
- ホストブラウザで Java が有効かどうかを示す
- 指定 URI の文書がネットワークを利用しなくても閲覧可能かどうかをチェックする
- ユーザ設定を設定する。このメソッドは、特権を持つコードでのみ使用可能です。現在は廃止されているため、代わりに XPCOM の Preferences API を用います。
- Web サイトを指定した MIME タイプに関連付ける
- Web サイト を指定したプロトコルに関連付ける
false
を返す。JavaScript の taint/untaint 関数は、JavaScript 1.2 で削除されています(※)- Causes vibration on devices with support for it. Does nothing if vibration support isn't available.