[w3c/screen-orientation] Send events before promise resolve (#120)

An annoyance with the orientation lock API, is that the promise resolves before the event is sent.

This makes it hard to default handlers that you don't want to call in certain cases, because if you remove the handler then there is no good place to add it back in, because if you do after the promise gets resolves, it might get called as the event is still pending :-( 

This also means that it makes sense for the unlock to return a promise.

We ran into this in https://github.com/intel/generic-sensor-demos/issues/72

-- 
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/120

Received on Friday, 21 September 2018 15:16:50 UTC