Skip to content

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): this

Parameters:

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

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