Skip to content

ElectronPowerMonitor.on('lock-screen') method

ElectronPowerMonitor › on(‘lock-screen’)

Unofficial

Emitted when the system is about to lock the screen.

Signature:

on($event: "lock-screen", listener: () => void): this

Parameters:

ParameterTypeDescription
$event"lock-screen"
listener() => voidCallback invoked when the event is emitted.

Returns: this — This PowerMonitor instance. Platform: darwin,win32.