Version: Smart Feature Phone 2.5

BatteryManager.health

The health status of battery.

Syntax#

var health = navigator.battery.health

On return, health indicates the status of battery health, which is enum includes Good, Overheat, Cold, Warm, Cool and Unknown.

Example#

HTML Content#

<div id="health">(health status unknown)</div>

JavaScript Content#

navigator.getBattery().then(function(battery) {
var health = battery.health;
document.querySelector('#health').textContent = health ;
});