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:

Parameter Type Description
event "lock-screen" The event name.
listener () => void Callback invoked when the event is emitted.

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