Battery Status API

Download javascript eBook


  1. Note that the Battery Status API is no longer available due to privacy reasons where it could be used by remote trackers for user fingerprinting.

  2. The Battery Status API is an Application Programming Interface for the client's battery status. It provides information on:

    • battery charging state via 'chargingchange' event and battery.charging;
    • battery level via 'levelchange' event and battery.level;
    • charging time via 'chargingtimechange' event and battery.chargingTime;
    • discharging time via 'dischargingtimechange' event and battery.dischargingTime.
  3. MDN Docs:

Related Examples


79 Contributors: 4
Wednesday, March 15, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial:

Download eBook