JSFiddle - React, Tailwind, and code Playground

by jeffposnick

HTML

<html>
    <head>
        <title>Accelerometer Test</title>
    </head>
    <body>
        <p>Log:</p>
        <ul id="log"></ul>
    </body>
</html>

JavaScript

window.addEventListener("deviceorientation", function(event) {
  $('#log').append('<li>' + JSON.stringify(event) + '</li>');
}, true);