Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. WindowControlsOverlayGeometryChangeEvent

WindowControlsOverlayGeometryChangeEvent

Limited availability

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

Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.

TheWindowControlsOverlayGeometryChangeEvent interface of theWindow Controls Overlay API is passed togeometrychange when the size or visibility of a desktop Progress Web App's title bar region changes.

Event WindowControlsOverlayGeometryChangeEvent

Constructor

WindowControlsOverlayGeometryChangeEvent()Experimental

Creates aWindowControlsOverlayGeometryChangeEvent event with the given parameters.

Instance properties

Also inherits properties from its parentEvent.

WindowControlsOverlayGeometryChangeEvent.titlebarAreaRectRead onlyExperimental

ADOMRect representing the position and size of the title bar region.

WindowControlsOverlayGeometryChangeEvent.visibleRead onlyExperimental

ABoolean that indicates whether the window controls overlay is visible or not.

Examples

The following example shows how to use aWindowControlsOverlayGeometryChangeEvent instance by adding anevent handler on theNavigator.windowControlsOverlay property, to listen to geometry changes of a PWA's title bar region.

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

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp