BatteryManager
Summary
The object that exposes the battery status information.
Properties
- charging
- Represents if the system’s battery is charging.
- chargingTime
- Represents the time remaining in seconds until the system’s battery is fully charged.
- dischargingTime
- Represents the time remaining in seconds until the system’s battery is completely discharged and the system is about to be suspended.
- level
- Represents the current battery level scaled from 0 to 1.0.
- onchargingchange
- Handles the chargingchange event.
- onchargingtimechange
- Handles the chargingtimechange event.
- ondischargingtimechange
- Handles the dischargingtimechange event.
- onlevelchange
- Handles the levelchange event.
Methods
No methods.
Events
- chargingchange
- Fired when the battery charging state is updated.
- chargingtimechange
- Fired when the battery charging time is updated.
- dischargingtimechange
- Fired when the battery discharging time is updated.
- levelchange
- Fired when the battery level is updated.
Related specifications
- Battery Status API
- W3C Last Call Working Draft