Disable ondevicelight attribute behind the flag
Categories
(Core :: DOM: Core & HTML, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: saschanaz, Assigned: saschanaz)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
Assignee | ||
Comment 1•3 years ago
|
||
Depends on D110172
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Pushed by krosylight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a616ae588449 Hide ondevicelight behind a flag r=smaug
Comment 3•3 years ago
|
||
bugherder |
Comment 4•3 years ago
|
||
Hi @Kagami
So as I understand it, this moves the Window.ondevicelight behind the preference device.sensors.ambientLight.enabled
.
Looking at the docs the associated event DeviceLightEvent has been behind this same preference since FF62 so would it be fair to say that this is just cleanup - ie making the event and the event handler be controlled in the same way?
Further, my understanding (and please correct me if I am wrong) is that there is no android UI for setting these preferences. Doesn't this mean that you're effectively turning off all device light support - since it is really only relevant on mobile devices and inaccessible on them too?
Last of all, can you give me a little background on why these device APIs (like this and proximity) never got adopted? Did the handling just move into the device itself so that pages don't have to do anything?
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
Hi Hamish again,
Looking at the docs the associated event DeviceLightEvent has been behind this same preference since FF62 so would it be fair to say that this is just cleanup - ie making the event and the event handler be controlled in the same way?
Exactly.
Further, my understanding (and please correct me if I am wrong) is that there is no android UI for setting these preferences. Doesn't this mean that you're effectively turning off all device light support - since it is really only relevant on mobile devices and inaccessible on them too?
Not sure "turning off" is the right word here, since it has been "turned off" already. It currently is present only because KaiOS requested to keep it, and not really for Android users.
Last of all, can you give me a little background on why these device APIs (like this and proximity) never got adopted? Did the handling just move into the device itself so that pages don't have to do anything?
Per Anne it's mainly about privacy issues:
- These APIs have various privacy leaks, including violating the same-origin policy, without the user being informed.
- These APIs do not match the current standards for sensor APIs and some are incompatible with what is being shipped by Chrome (e.g., device orientation).
- There's no interest to address these shortcomings. (Mostly in the sense of engineering resources and having other problems to tackle first.)
- As these are event-driven APIs the compatibility impact should be minimal to none. The events simply won't fire.
Comment 6•3 years ago
|
||
Thanks very much. Really appreciate your help. If you are interested, the documentation for this can be tracked in https://github.com/mdn/content/issues/4308.
Essentially this is
- a BCD version update which will show removal in FF89 for desktop, FF79 for Android (as the preference UI is not available there).
- Docs with much more clear warnings against using these events in both the event docs and the API docs (Ambient Light API and Proximity Event API). As part of the tidy the attribute docs got merged into their parent event docs, so there are fewer places where these APIs will be encountered (i.e. this is a first step to on day deciding the docs can be deleted).
Comment 7•3 years ago
|
||
Docs completed, so setting this to DDC. Thanks Hamish!
Description
•