Created
August 11, 2015 00:12
-
-
Save hoox/0784b8d6f0fedc85d8d2 to your computer and use it in GitHub Desktop.
Battery Details
This file contains 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.getBattery().then(function(battery){ | |
console.log(battery.level); | |
console.log(battery.charging); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment