-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up the data for navigator.getBattery() #9626
Conversation
Summary of changes: - Remove navigator.battery, which has been removed since 2013/2016 in Chrome and Firefox respectively. - Treat BatteryManager as only supported since navigator.getBattery() was supported, making the data consistent but technically wrong. - Simplify Firefox support to only represent when it was on by default for web content. Flags before that and chrome-only after is removed. - Remove claims of prefixes on BatteryManager, the only prefixes here have been navigator.mozBattery and navigator.webkitBattery. - Don't claim it's deprecated, https://w3c.github.io/battery/ is still a "real" spec and Chromium hasn't deprecated it. - Scope the chargingTime/dischargingTime notes to just those entries, and treat it as fixed in Chromium 42 (see below). The chargingTime/dischargingTime issue was fixed in Chromium 42: https://bugs.chromium.org/p/chromium/issues/detail?id=401553 https://storage.googleapis.com/chromium-find-releases-static/13e.html#13e397e55501bee3903bfe46edfd56f2442c1f11 Data originally from mdn#1102. There was no evidence for or discussion on the webview_android version being 40. All existing versions were treated as untrustworthy and data was mirrored to all Chromium browsers.
Reviewers, there are two things here I expect some might disagree with and are worth flagging. First, should Second, I nuked a lot of notes for Firefox. They don't seem relevant to anyone today, but I'm not sure, should some of it be preserved to help people understand why this was remove from Firefox? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, should
navigator.battery
and its prefixed forms instead be treated as aliases ofnavigator.getBattery()
and merged into that entry?
No, I think you've made the right choice here. I think it's fine to treat this as a materially different feature which was removed. It so happens that it was removed sufficiently long ago that it's now irrelevant. Let's put it in the 🗑️.
That said, would you mind opening a PR on mdn/content to redirect https://developer.mozilla.org/en-US/docs/Web/API/Navigator/battery to https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getBattery?
Second, I nuked a lot of notes for Firefox. They don't seem relevant to anyone today, but I'm not sure, should some of it be preserved to help people understand why this was remove from Firefox?
I think you made the right call here too. The prefixes are ancient history and would be removed if they were standalone features. The prefs would also be irrelevant by now. The chrome code stuff is off-topic and could also be removed legitimately. What's left makes sense. 👍
I do have one suggestion in a line comment, about the experimental
status for all of this.
Summary of changes:
Chrome and Firefox respectively.
was supported, making the data consistent but technically wrong.
for web content. Flags before that and chrome-only after is removed.
have been navigator.mozBattery and navigator.webkitBattery.
a "real" spec and Chromium hasn't deprecated it.
and treat it as fixed in Chromium 42 (see below).
The chargingTime/dischargingTime issue was fixed in Chromium 42:
https://bugs.chromium.org/p/chromium/issues/detail?id=401553
https://storage.googleapis.com/chromium-find-releases-static/13e.html#13e397e55501bee3903bfe46edfd56f2442c1f11
Data originally from #1102.
There was no evidence for or discussion on the webview_android version
being 40. All existing versions were treated as untrustworthy and data
was mirrored to all Chromium browsers.