I am trying to test hardware support for the acceleration property of a devicemotion HTMLEvent on mobile devices. As apparently those without a gyroscope only support accelerationIncludingGravity.
My first idea is to let the window object listen to devicemotion and retrieve the information, then remove the listener and add it again with a different handler. But I wonder if there's a more elegant way to test for this.
 
    