| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/en-US/docs/Web/API/WindowControlsOverlay | [Back] [Original] |
Get to know MDN better
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Want more browser support for this feature? Tell us why.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The WindowControlsOverlay interface of the Window Controls Overlay API exposes information about the geometry
of the title bar area in desktop Progressive Web Apps, and an event to know whenever it changes. This interface is accessible from Navigator.windowControlsOverlay.
WindowControlsOverlay.visible Read only A Boolean that indicates whether the window controls overlay is visible or not.
WindowControlsOverlay.getTitlebarAreaRect() Returns the size and position of the title bar.
Listen to these events using EventTarget.addEventListener() or by assigning an event listener to the relevant oneventname property of this interface.
geometrychange Fired when the geometry of the title bar area changes.
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.
}
},
);
}
| Specification |
|---|
| Window Controls Overlay # windowcontrolsoverlay-interface |
This page was last modified on Dec 10, 2023 by MDN contributors.
WindowControlsOverlayYour blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |