Skip to content

ElectronPowerMonitor.on('shutdown') method

ElectronPowerMonitor › on(‘shutdown’)

Unofficial

Emitted when the system is about to reboot or shut down. If the event handler invokes event.preventDefault(), Electron will attempt to delay system shutdown in order for the app to exit cleanly.

Signature:

on(event: "shutdown", listener: (event: ElectronEvent) => void): this

Parameters:

Parameter Type Description
event "shutdown" The event name.
listener (event: ElectronEvent) => void Callback invoked when the event is emitted.

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