feat: add powerMonitor.onBatteryPower (#26494)
This commit is contained in:
parent
8594b55dee
commit
a9924e1c32
4 changed files with 38 additions and 2 deletions
|
@ -65,3 +65,18 @@ before considered idle. `locked` is available on supported systems only.
|
|||
Returns `Integer` - Idle time in seconds
|
||||
|
||||
Calculate system idle time in seconds.
|
||||
|
||||
### `powerMonitor.isOnBatteryPower()`
|
||||
|
||||
Returns `Boolean` - Whether the system is on battery power.
|
||||
|
||||
To monitor for changes in this property, use the `on-battery` and `on-ac`
|
||||
events.
|
||||
|
||||
## Properties
|
||||
|
||||
### `powerMonitor.onBatteryPower`
|
||||
|
||||
A `Boolean` property. True if the system is on battery power.
|
||||
|
||||
See [`powerMonitor.isOnBatteryPower()`](#powermonitorisonbatterypower).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue