Something like "dom.battery.enabled". true by default but can be turned false. In that case, I don't know if navigator.mozBattery should return null or if we should return the default values. I'm worried returning null might break some websites.
Or not be exposed at all?
The property shouldn't be defined at all. That's what we do for other preffable DOM features.
That would be better indeed but that would make changing the pref during run time useless, right? Seems a fair trade though.
> That would be better indeed but that would make changing the pref during run time
Depends on how we implement. If we look at the pref during prototype setup, then flipping the pref and reloading the page would work. If we only look at it during the classinfo initialization stuff then flipping it would need a browser restart, yes.
Created attachment 571817 [details] [diff] [review]
We should probably push this before the Aurora uplift (the 8th). Worst case, we could directly push it to Aurora but better to prevent this.