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

yes, indeed. Ok, so scratch checking the preconditions. 

If we assume the following invariant:

> `.lock()` must support all orientations in one way or another, even if those orientations get mapped to something else (e.g., landscape-secondary -> landscape-primary, natural -> portrait-primary). 
 
Then that only requires a single check: ".canProbablyLock" (boolean) which would be: "they're nothing preventing user agent from attempting to lock the screen orientation". 

On desktop platforms, this would return `false`, because there it is known to not bother even trying. 

On other platforms, it wold return yes - but `.lock()` might still fail for a number of reasons. 


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

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

Received on Thursday, 27 October 2022 07:39:36 UTC