Skip to content
Advertisement

Tag: battery

Get battery level JavaScript

/! THE USE OF window.navigator.battery IS STRONGLY DISCOURAGED AND THIS ISSUE IS NOW NOT WORTH CHECKING THANK YOU /! I want to get the battery level of the current system. Here is the output I intend to get: If desktop (no battery) Battery level : 100% If laptop Battery level : XXX% (depending the level) So I tried the snippet

Advertisement