title: How do I get DeviceOrientationEvent and DeviceMotionEvent to work on Safari?
body: <p>I'm trying to implement DeviceOrientationEvent and DeviceMotionEvent on my website for a 3D effect. However, the console doesn't log any info and apparently iOS 13 requires a user set permission to start doing this. I can't seem to figure out how to set it up properly.</p>
  
  <p>I've done some research and this is what I found: <a href="https://github.com/w3c/deviceorientation/issues/57#issuecomment-498417027" rel="noreferrer">https://github.com/w3c/deviceorientation/issues/57#issuecomment-498417027</a></p>
  
  <p>All other methods provided online are not usable anymore sadly.</p>
  
  <pre><code>window.addEventListener('deviceorientation', function(event) {
      console.log(event.alpha + ' : ' + event.beta + ' : ' + event.gamma);
  });
  </code></pre>
  
  <p>I get the following error message: </p>
  
  <p>[Warning] No device motion or orientation events will be fired until permission has been requested and granted.</p>