- From: Keith Ito via GitHub <sysbot+gh@w3.org>
- Date: Mon, 08 Apr 2019 23:04:43 +0000
- To: public-device-apis-log@w3.org
To add to @neave's workaround, it appears the deviceorientation API still works in Chrome, so you could prompt the user to open the page in Chrome if you detect that deviceorientation is broken. Something like: ``` <div id="nodeviceorientation" style="display:none"> This page no longer works in your browser.<br> <a href="googlechromes://YOUR_URL">Open in Chrome</a> or <a href="itms-apps://itunes.apple.com/us/app/chrome/id535886823">Install Chrome</a> </div> <script> const id = setTimeout(() => { document.getElementById('nodeviceorientation').style.display = 'block' }, 500); window.addEventListener('deviceorientation', (e) => clearTimeout(id)); </script> ``` Not a great solution, but possibly the easiest option for the user given the current state of things. -- GitHub Notification of comment by keithito Please view or discuss this issue at https://github.com/w3c/deviceorientation/issues/57#issuecomment-481039307 using your GitHub account
Received on Monday, 8 April 2019 23:04:45 UTC