留出時間,直到電池充滿電
// 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" );
});