Navigator: windowControlsOverlay-Eigenschaft

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Sicherer Kontext: Diese Funktion ist nur in sicheren Kontexten (HTTPS) in einigen oder allen unterstützenden Browsern verfügbar.

Die schreibgeschützte windowControlsOverlay-Eigenschaft des Navigator-Interfaces gibt das WindowControlsOverlay-Interface zurück. Dieses Interface bietet Informationen über die Geometrie der Titelleiste in Desktop-Progressive-Web-Apps, die die Window Controls Overlay API verwenden.

Progressive Web Apps, die auf Desktop-Betriebssystemen installiert sind, können die Window Controls Overlay-Funktion nutzen, indem sie den Wert window-controls-overlay im display_override-Mitglied des Web-App-Manifests verwenden.

Dadurch wird die standardmäßige Fenster-Titelleiste ausgeblendet und die App erhält Zugriff auf den gesamten Bereich des App-Fensters.

Wert

Das WindowControlsOverlay-Interface.

Beispiele

js
if ("windowControlsOverlay" in navigator) {
  const rect = navigator.windowControlsOverlay.getTitlebarAreaRect();
  // Do something with the title bar area rectangle.
} else {
  // The Window Controls Overlay feature is not available.
}

Spezifikationen

Specification
Window Controls Overlay
# windowcontrolsoverlay-interface

Browser-Kompatibilität

BCD tables only load in the browser