JavaScript Battery Status API

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Remarks

  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: https://developer.mozilla.org/en/docs/Web/API/Battery_status_API



Got any JavaScript Question?