iOS4.2はSafariの機能も大幅にバージョンアップしてますね。その中でも特に目玉なのがWebSokectと加速度センサのサポートだと思います。早速加速度センサのほうのDemoなどつくってみました。 DEMO for iOS 使い方は簡単で window.addEventListener('devicemotion', function(evt) { console.log(evt.accelerationIncludingGravity.x); //=> x console.log(evt.accelerationIncludingGravity.y); //=> y console.log(evt.accelerationIncludingGravity.z); //=> z }); これだけです。 WebSocketと加速度センサのサポートはWebアプリつくっている人からするとか
![iOS4.2の加速度センサ試してみたよ - Webtech Walker](https://cdn-ak-scissors.b.st-hatena.com/image/square/c4c16447eff126477daf44f3258b48b98d139942/height=288;version=1;width=512/http%3A%2F%2Fwebtech-walker.com%2Fimg%2Fcommon%2Ficon.png)