зеркало из https://github.com/mozilla/gecko-dev.git
17 строки
406 B
HTML
17 строки
406 B
HTML
<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>
|