Closed Bug 699459 Opened 13 years ago Closed 13 years ago

Add a pref to disable Battery API

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: mounir, Assigned: mounir)

References

Details

(Keywords: user-doc-needed)

Attachments

(1 file)

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. See nsIDOMStorageIndexedDB.
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 > useless, 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.
Flags: in-testsuite?
Flags: in-litmus?
Keywords: user-doc-needed
Attached patch Patch v1 (deleted) — Splinter Review
Attachment #571817 - Flags: review?(jonas)
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.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla10
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: