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"The event name.
listener() => voidCallback invoked when the event is emitted.

Returns: thisThis PowerMonitor instance. Platform: darwin,win32.