Re: [w3c/screen-orientation] cordova-plugin-screen-orientation does not work (#123)

So, as @Honry said, using async/await:

```JS
async function fixpositionscreen(){
 try {
  alert('trying...');
  if (await screen.orientation.lock('portrait-primary')) { 
                     alert('yes, it was blocked');
                }
  else {alert('no, it was not blocked....');}
 }
 catch(err){
  alert(err);
 }
}
fixpositionscreen();
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/screen-orientation/issues/123#issuecomment-438534847

Received on Wednesday, 14 November 2018 04:38:30 UTC