Battery level

The navigator.getBattery() reports the state of the battery and can be misused to fingerprint users for a short term. The API was removed from Firefox, but is still supported in browsers derived from Chromium. The wrapper mimics Firefox behaviour.

See also: https://lukaszolejnik.com/battery

Known bug: Because we mimic Firefox behaviour, a Chromium derived browser becomes more easily fingerprintable. This can be fixed by properly wrapping BatteryManager.prototype getters and setters.