Host · class
BrowserScreenPresentation
Explained in Display and the host.
class BrowserScreenPresentation implements ScreenPresentationimport { BrowserScreenPresentation } from '@driftengine/core';Constructor
new
constructor()Installs one stylesheet, once, and that is the only side effect in this file.
More
env(safe-area-inset-*) cannot be read from script directly — it is only valid inside a CSS
declaration — so the values are copied into custom properties on the root element and read
back through getComputedStyle. The alternative is a hidden probe element whose padding is
measured, which costs a layout on every read and a node in every consumer's tree.
Methods
orientation
orientation(): ScreenOrientationlockOrientation
lockOrientation(orientation: ScreenOrientation | null): Promise<boolean>| Parameter | Type | Description |
|---|---|---|
orientation | ScreenOrientation | null |
safeArea
safeArea(): SafeAreaInsetskeepAwake
keepAwake(on: boolean): Promise<boolean>| Parameter | Type | Description |
|---|---|---|
on | boolean |