file_bug1197901.html 406 B

1234567891011121314151617
  1. <pre>Sensor events testing</pre>
  2. <script>
  3. window.onmessage = function (event) {
  4. if (event.data.command == "addEventListener") {
  5. window.addEventListener(
  6. "devicemotion", function() {
  7. event.source.postMessage({ result: event.data.expected,
  8. message: event.data.message },
  9. "*");
  10. }
  11. );
  12. }
  13. }
  14. </script>