Host · class
BrowserLifecycle
Explained in Display and the host.
class BrowserLifecycle implements Lifecycleimport { BrowserLifecycle } from '@driftengine/core';Methods
onFocusChange
onFocusChange(handler: (focused: boolean) => void): () => void| Parameter | Type | Description |
|---|---|---|
handler | (focused: boolean) => void |
onQuitRequest
onQuitRequest(handler: () => void): () => voidA browser is never asked to quit, so this handler is never called here.
| Parameter | Type | Description |
|---|---|---|
handler | () => void |
More
The unsubscribe is real rather than the handler being rejected: a consumer registers the same handler on both platforms and must be able to drop it on both, and code that has to ask which platform it is on has lost the point of the seam.
requestQuit
requestQuit(): voidSignatures
canQuit = falsereadonly
readonly canQuit = falseFalse: no page may close the tab it is in. An exit button here is a button that lies.