BatteryManager interface of the Battery Status API provides information about the system's battery charge level. The
navigator.getBattery() method returns a promise that resolves with a
A Boolean value indicating whether the battery is currently being charged.
A number representing the remaining time in seconds until the battery is fully charged, or 0 if the battery is already fully charged.
A number representing the remaining time in seconds until the battery is completely discharged and the system suspends.
A number representing the system's battery charge level scaled to a value between 0.0 and 1.0.
Inherits methods from its parent interface:
Fired when the battery charging state (the
chargingproperty) is updated.
Fired when the battery charging time (the
chargingTimeproperty) is updated.
Fired when the battery discharging time (the
dischargingTimeproperty) is updated.
Fired when the battery level (the
levelproperty) is updated.
|Battery Status API |
BCD tables only load in the browser