Skip to content

Commit

Permalink
summary of change:
Browse files Browse the repository at this point in the history
Device Motion Event and Device Orientation Event support

what has been changed:
added test for Device Motion Event support, returns boolean value true/false
added test for Device Orientation Event support, returns boolean value true/false

background:
Part of Device Access aspect of HTML5, same category as geolocation
W3C Editor's Draft at http://dev.w3.org/geo/api/spec-source-orientation.html
Implementation by iOS Safari at http://goo.gl/fhce3 and http://goo.gl/rLKz8
  • Loading branch information
chuanxshi committed Jun 5, 2011
1 parent ff92dce commit 0a10e22
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions feature-detects/device-orientation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//By Shi Chuan
//Part of Device Access aspect of HTML5, same category as geolocation
//W3C Editor's Draft at http://dev.w3.org/geo/api/spec-source-orientation.html
//Implementation by iOS Safari at http://goo.gl/fhce3 and http://goo.gl/rLKz8


//test for Device Motion Event support, returns boolean value true/false
Modernizr.addTest('devicemotion', ('DeviceMotionEvent' in window) );

//test for Device Orientation Event support, returns boolean value true/false
Modernizr.addTest('deviceorientation', ('DeviceOrientationEvent' in window) );

0 comments on commit 0a10e22

Please sign in to comment.