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