crossbind
GitHub
← All extensions

power

Tells a desktop page when the system sleeps and wakes.

Package @crossbind/extension-powernpm ↗Source ↗

An app has it by having @crossbind/core-app-host, which lists it as a dependency: there is nothing to install or list.

Use

JavaScript
import { events } from 'crossbind/app';
 
events.on('suspend', () => saveDraft());
events.on('resume', () => reconnect());

Platforms

macOS, Linux and Windows, from the time the app's first window opens.

Replace or leave out

It holds the role power. An extension that gives replaces: 'power' takes it; app: { without: ['power'] } in crossbind.config.js leaves it out. The guide shows how, and extensions.md what a replacement answers.

app.md has the app's other events.

Type to search every guide page and section.
↑↓ navigate↵ openesc close