Re: [w3c/screen-orientation] Feature detection of orientation.lock (Issue #206)

@domenic, the problem here is that: 

 * a web app might need to provide significant UI (rotate button(s)) before it knows if it can even rotate. 
 * the only way to know if it will change orientation is by actually changing orientation.

So, imagine (this would be really bad for users):

```JS
// lets' figure out what's supported
const supported = [];
for (const o in orientations)
   try {
       await screen.orientation.lock(o);
       supported.push(o);
    } catch { continue; }
}
screen.orientation.unlock();
showUI(supported);
```

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

Message ID: <w3c/screen-orientation/issues/206/1273981653@github.com>

Received on Tuesday, 11 October 2022 01:45:43 UTC