- From: Marcos Cáceres <notifications@github.com>
- Date: Thu, 01 Aug 2019 22:09:50 -0700
- To: w3c/screen-orientation <screen-orientation@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 2 August 2019 05:10:13 UTC
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