Apple has opened up accelerometer and gyroscope access to mobile Safari web developers in iOS 4.2, meaning iPhone, iPod touch and iPad sites can potentially be controlled by those motion sensors. Developer Maximiliano Firtman spotted the update, which appears to be based on the W3C draft for the DeviceOrientation API; he's also thrown together a quick rolling-ball demo, which you can see after the cut.
Video demo after the cut
The new functionality opens up the possibility of motion-sensitive web games, navigation of complex web pages by simply tilting the phone, and augmented reality apps that do not have to be locally stored on the iOS device. Meanwhile Apple has also added the WebSockets API, updated their HTML5 Form support and made other tweaks.