title: Mobile Screen orientation lock not working
body: <p>I'm trying to lock screen orientation using the Screen Orientation API as specified here: <a href="https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation</a>
  and here: <a href="https://w3c.github.io/screen-orientation/#examples" rel="nofollow noreferrer">https://w3c.github.io/screen-orientation/#examples</a></p>
  
  <p>The API is still in Working Draft, but it shows that Chrome and Firefox support it but I can't get it to work.</p>
  
  <p>I tried the following:<br>
  1)
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>screen.orientation.lock('portrait').catch(function() { /*Do Nothing*/ });</code></pre>
  </div>
  </div>
  </p>
  
  <p>2) <br></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>screen.lockOrientationUniversal = screen.lockOrientation || screen.mozLockOrientation || screen.msLockOrientation;
  
  if (screen.lockOrientationUniversal(["portrait"])) {
    // orientation was locked
  } else {
    // orientation lock failed
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>But its not working on chrome mobile.</p>