Oct
13

Firefox 3.6 to use device orientation

A nice little trick appeared on the Mozilla hacks blog. Firefox 3.6 will be able to use your device orientation (if the information is available) and apply it to a web page. For now, I can’t really see any use for it, but hey, it is cool anyway.

Using the API is very simple. All you have to do is add a simple event listener:

  1. window.addEventListener("MozOrientation", function(e) {
  2.                         /* 3 values: e.x, e.y, e.z */
  3.                         }, true);

Leave a comment

RSSSome Tweets