Skip to content

ElectronPowerMonitor.isOnBatteryPower method

ElectronPowerMonitor › isOnBatteryPower

Unofficial

Whether the system is on battery power.

To monitor for changes in this property, use the on-battery and on-ac events.

Signature:

isOnBatteryPower(): boolean

Returns: booleantrue if the system is on battery power.