留出时间,直到电池充满电
// Get the battery API
navigator.getBattery().then(function(battery) {
console.log( "Battery will get fully charged in ", battery.chargingTime, " seconds" );
});
// Get the battery API
navigator.getBattery().then(function(battery) {
console.log( "Battery will get fully charged in ", battery.chargingTime, " seconds" );
});