WindowControlsOverlay - Web APIs | MDN
Instance properties
WindowControlsOverlay.visibleRead only Experimental-
A Boolean that indicates whether the window controls overlay is visible or not.
Instance methods
WindowControlsOverlay.getTitlebarAreaRect()Experimental-
Returns the size and position of the title bar.
Events
Listen to these events using EventTarget.addEventListener() or by assigning an event listener to the relevant oneventname property of this interface.
geometrychangeExperimental-
Fired when the geometry of the title bar area changes.
Examples
js
if ("windowControlsOverlay" in navigator) {
navigator.windowControlsOverlay.addEventListener(
"geometrychange",
(event) => {
if (event.visible) {
const rect = event.titlebarAreaRect;
// Do something with the coordinates of the title bar area.
}
},
);
}
Specifications
| Specification |
|---|
| Window Controls Overlay # windowcontrolsoverlay-interface |