HTML and CSS Reference
This chapter provided an introduction to the window.orientation value along with the details of using
the deviceorientation event to enable the addition of accelerometer-based gameplay into your HTML5
games. This capability, however, comes with the caveat that rotations that cause the device screen orientation
to change don't play nice with HTML5 gaming. By opening up the device orientation to the browser, HTML5
game developers now have more tools in their tool belt to build games that use creative input mechanisms.