Another “hidden” feature has been found that brings excitement to the world of web apps.
Apple has implemented API’s for accelerometer and gyroscope into Safari on devices running iOS 4.2. It’s based on the “DeviceOrientation Event Spesification” draft from W3C.
If you feel like trying it out for yourself the Safari developer DeviceMotionEvent Class Reference and DeviceOrientationEvent Class Reference documents is a good place to start.
There’s a few blog posts around that can show you how it’s done. Mobile Web Programming and the Web Builder Zone has post on it that talks a bit about the coding. TheNextWeb has a piece about the “hidden” Safari Mobile features that links to a really nice showcase.
Creating really rich web applications is becoming more and more exciting!