WindowControlsOverlayGeometryChangeEvent: WindowControlsOverlayGeometryChangeEvent() constructor

Limited availability

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

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The WindowControlsOverlayGeometryChangeEvent() constructor returns a new WindowControlsOverlayGeometryChangeEvent object, representing the current geometry of a desktop Progressive Web App's title bar area.

Syntax

js
new WindowControlsOverlayGeometryChangeEvent(type, options)

Parameters

The WindowControlsOverlayGeometryChangeEvent() constructor also inherits arguments from Event().

type

A string indicating the event type. It is case-sensitive and browsers set it to geometrychange.

options

An object with the following properties:

visible Optional

A boolean flag that's true when the titlebarAreaRect object's values are not 0. Its default value is false.

titlebarAreaRect

A DOMRect representing the position and size of the title bar area.

Specifications

Specification
Window Controls Overlay
# windowcontrolsoverlay-interface

Browser compatibility

desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
WindowControlsOverlayGeometryChangeEvent() constructor
Experimental

See also