Skip to content

1681-engine / mobile / safeAreaInsets

Function: safeAreaInsets() ​

ts
function safeAreaInsets(doc?): Insets;

Defined in: src/mobile/screen.ts:14

The safe-area insets as the browser has them now (CSS env(safe-area-inset-*)), read through a hidden probe element: what a canvas HUD must keep its buttons out of when the web view is drawn edge to edge. Zeros where there is no document or no notch.

Parameters ​

ParameterTypeDefault value
docDocument | undefinedglobalThis.document

Returns ​

Insets

Released under the MIT License.