Window.navigator
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.
La propriété en lecture-seule Window.navigator
renvoie une référence à un objet qui est une instance de Navigator
et possède des méthodes et propriétés à propos de l'application qui exécute le script.
Syntaxe
js
navigatorObject = window.navigator;
Exemple
js
var sUsrAg = navigator.userAgent;
console.log("Voici l'agent utilisateur du navigateur courant", sUsrAg);
Spécifications
Specification |
---|
HTML # dom-navigator |
Compatibilité des navigateurs
Report problems with this compatibility data on GitHubdesktop | mobile | server | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
navigator |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Uses a non-standard name.
- Has more compatibility info.
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.