Navigator: windowControlsOverlay property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The windowControlsOverlay
read-only property of the Navigator
interface returns the WindowControlsOverlay
interface, which exposes
information about the title bar geometry in desktop Progressive Web Apps that use the Window Controls Overlay API.
Progressive Web Apps installed on desktop Operating Systems can opt-in to the
Window Controls Overlay feature by using the window-controls-overlay
value in the
display_override
web app manifest member.
Doing so hides the default window title bar and gives the app access to the full area of the app window.
Value
The WindowControlsOverlay
interface.
Examples
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.
}
Specifications
Specification |
---|
Window Controls Overlay # windowcontrolsoverlay-interface |
Browser compatibility
BCD tables only load in the browser