Open
Bug 848726
Opened 12 years ago
Updated 2 years ago
window.DeviceMotionEvent should not be defined if the hardware cannot provide accelerometer data
Categories
(Core :: DOM: Device Interfaces, defect, P3)
Tracking
()
NEW
People
(Reporter: alice.lieutier, Unassigned)
References
Details
Attachments
(1 file)
340 bytes,
text/html
|
Details |
There should be a way for web developpers to know if they can use the DeviceMotionEvent on the browser they use with the hardware they use.
Currently, window.DeviceMotionEvent is always exposed in Firefox, even when the hardware does not provide information about the device motion (e.g. on most desktop).
I attached a simple feature sniff for DeviceMotionEvent.
Here is a page that records data from DeviceMotionEvent:
http://alicelieutier.github.com/skiptherope/accelerometer.html
Comment 1•12 years ago
|
||
Can we have a method that adds the method in the window interface based on the availability of the feature with WebIDL? Doug, do we have a way to know that upfront?
Comment 2•12 years ago
|
||
Comment 3•12 years ago
|
||
Doug, is there any way for Gecko to know if DeviceMotionEvent is supported by the system? For example, SSD disks don't give that support even if we have a MacOS X backend.
Flags: needinfo?(doug.turner)
Updated•7 years ago
|
Priority: -- → P3
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•