Window.screen
Retourne une référence à l'objet
screen
associé à la fenêtre. L'object screen
, qui implémente l'interface Screen
(en-US), est un objet spécial servant à examiner les propriétés de l'écran qui affiche la fenêtre courante.Syntaxe
objetEcran = window.screen;
Examples
if (screen.pixelDepth < 8) {
// utiliser la page en colorisation réduite
} else {
// utiliser la page en coolorisation normale
}
Spécifications
Spécification | État | Commentaires |
---|---|---|
CSS Object Model (CSSOM) View Module La définition de 'window.screen' dans cette spécification. |
Version de travail |
Compatibilité des navigateurs
BCD tables only load in the browser