Window.screen
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.
Retourne une référence à l'objet screen
associé à la fenêtre. L'object screen
, qui implémente l'interface Screen
, est un objet spécial servant à examiner les propriétés de l'écran qui affiche la fenêtre courante.
Syntaxe
js
objetEcran = window.screen;
Examples
js
if (screen.pixelDepth < 8) {
// utiliser la page en colorisation réduite
} else {
// utiliser la page en coolorisation normale
}
Spécifications
Specification |
---|
CSSOM View Module # dom-window-screen |
Compatibilité des navigateurs
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
screen |
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.