-
-
Save brianleroux/cc8b4adc0f9f0b7df654 to your computer and use it in GitHub Desktop.
making battery status api async http://www.w3.org/TR/battery-status/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
navigator.battery.then(function(status) { | |
status.charging // bool | |
status.chargingTime // dbl | |
status.dischargingTime // dbl | |
status.level // dbl | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment