Created attachment 722160 [details] testcase 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
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?
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.
we could do more than we do now, for sure.
8 months ago
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.