Re:Your battery status may be used to track you online
by DougWebb on Tuesday August 02, 2016 @03:39PM
(#12212690)
Nope; either the information is not available to Javascript code at all, or the Javascript code can do whatever it wants with the info.
A security permission, or config setting, can/should be used to prevent access to the api that returns the battery level. But once access is enabled, there's no way to prevent the code from getting the level (which is just a number) and sending it to a server (which is just calling an ajax request with a numeric argument.)
Surely it's possible for JavaScript engines to either (a) optionally prevent code from accessing this; or (b) return random nonsense, or even just a single fixed static value (for every instance of the engine anywhere).