What is onlevelchange event?

Report
Question
18 views

Please explain why do you think this question should be reported?

Report Cancel

Fires when the battery level of the device changes.

Example

    navigator.getBattery().then(function(battery) {
        battery.onlevelchange = function() {
        console.log(this.level);
        };
    });
Please follow and like us:

About the Author