(If this is already discussed, please close this)
When I look this spec, I cannot find feature detection section. Even If orientation.lock isn't supported, Blink and Gecko have this method in orientation. Then when calling it, NotSupportedError is throw if browser doesn't support it.
For feature detection of orientation.lock, is there a way of feature detection without using orientation.lock like following? And I hope that we add feature detection section for lock.
async function isLockSupport() {
try {
await orientation.lock('any');
orientation.unlock();
return true;
} catch (e) {
}
return false;
}