- From: Paul Neave via GitHub <sysbot+gh@w3.org>
- Date: Mon, 25 Mar 2019 21:47:38 +0000
- To: public-device-apis-log@w3.org
> No, it doesn't. I cannot comment on _when_ it will ship but I have already agreed to post a message on this issue when the permission API becomes available in a public beta.
This is disappointing. I hope the API will make it into an update soon.
For anyone looking for a workaround, the best thing to do is to detect the disabled state via a timeout and clear it in the event handler. Something like this:
```
const id = setTimeout(() => alert('Enable device orientation in Settings > Safari > Motion & Orientation Access.'), 500);
window.addEventListener('deviceorientation', event => {
clearTimeout(id);
// ...
});
```
--
GitHub Notification of comment by neave
Please view or discuss this issue at https://github.com/w3c/deviceorientation/issues/57#issuecomment-476390630 using your GitHub account
Received on Monday, 25 March 2019 21:47:39 UTC