ElectronPowerMonitor.on('shutdown') method
ElectronPowerMonitor › on(‘shutdown’)
Unofficial
Emitted when the system is about to reboot or shut down. If the event handler invokesevent.preventDefault(), Electron will attempt to delay system shutdown in order for the app to exit cleanly. Signature:
on(event: "shutdown", listener: (event: ElectronEvent) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| event | "shutdown" | The event name. |
| listener | (event: ElectronEvent) => void | Callback invoked when the event is emitted. |
Returns: this — This PowerMonitor instance. Platform: linux,darwin.