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

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

BCD tables only load in the browser