Battery API All In One
https://caniuse.com/?search=Battery
navigator.getBattery()
/*
Promise {<pending>}__proto__: Promise[[PromiseState]]: "fulfilled"[[PromiseResult]]: BatteryManagercharging: truechargingTime: 0dischargingTime: Infinitylevel: 1onchargingchange: nullonchargingtimechange: nullondischargingtimechange: nullonlevelchange: null__proto__: BatteryManager
*/
W3C
Battery Status API
W3C Candidate Recommendation 07 July 2016
https://www.w3.org/TR/battery-status/
Battery Status API
W3C Editor's Draft 25 September 2019
https://w3c.github.io/battery/
Battery Status API
https://developer.mozilla.org/en-US/docs/Web/API/Battery_Status_API
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/battery
https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getBattery
https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/level
refs
WakeLock
https://developer.mozilla.org/en-US/docs/Web/API/WakeLock
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!