ElectronPowerMonitor.on('on-battery') method
ElectronPowerMonitor › on(‘on-battery’)
Unofficial
Emitted when the system changes to battery power.Signature:
on($event: "on-battery", listener: () => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | "on-battery" | |
| listener | () => void | Callback invoked when the event is emitted. |
Returns: this — This PowerMonitor instance. Platform: darwin.