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.
}
},
);
}WindowControlsOverlayGeometryChangeEvent / notebook
WindowControlsOverlayGeometryChangeEvent
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.