3 ms·
> But, there's also no way to prevent the information from being sent, once you make it available to javascript code on the device. Surely it's possible for Ja
by aeorgnoieang 10y ago
> But, there's also no way to prevent the information from being sent, once you make it available to javascript code on the device.
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).
- DougWebb 10y agoNope; 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.)