summaryrefslogtreecommitdiffstats
path: root/dom/system/tests/file_bug1197901.html
blob: e4ca9fd380a1234e8dc66c1d5c348dea77377178 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<pre>Sensor events testing</pre>
<script>

window.onmessage = function(event) {
  if (event.data.command == "addEventListener") {
    window.addEventListener(
      "devicemotion", function() {
          event.source.postMessage({ result: event.data.expected,
                                     message: event.data.message },
                                   "*");
        }
      );
  }
};

</script>