Re: [w3c/screen-orientation] lock() should not fail if another lock() is called in the change event (#184)

Hmm... so this was https://github.com/w3c/screen-orientation/issues/120

Copying the promise to special case this doesn't feel right to me. If the caller has a reference to the original promise, then I wonder if they can just await it?:

```JS
const p1 = screen.orientation.lock(someOrientation);
let p2;
screen.orientation.onchange = async () => {
  await p1; // wait for p1 to settle...
  // change it!
  p2 = screen.orientation.lock("portrait");
}
await p1;
await p2; 
```


-- 
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/184#issuecomment-517551163

Received on Friday, 2 August 2019 05:10:13 UTC