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

Just thinking out loud here... a `.canLock()` method could be an alternative. 

To return true, the `.canLock()` method presupposes that:

 * all orientations are supported in one way or another (e.g, "portrait-secondary" is treated as "portrait-primary"). 
 * all pre-lock conditions are met (e.g., is in full screen). 
 * The OS supports locking and/or there isn something else that would prevent the lock (without revealing what "something else" is, for privacy reasons).
 * The document fully active. 

Additionally, I think all the preconditions of `.canLock()` can be checked synchronously: it would basically perform all the synchronous checks that `.lock()` performs before doing its "in parallel" steps. 


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

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

Received on Tuesday, 18 October 2022 06:15:25 UTC