Version: Smart Feature Phone 2.5


Specifies an event listener to receive batteryhealthchange events. These events occur when the battery health state is updated.


battery.onbatteryhealthchange = funcRef

Where battery is a BatteryManager object, and funcRef is a function to be called when the batteryhealthchange event occurs.


HTML Content#

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

JavaScript Content#

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