- From: Kenneth Rohde Christiansen <kenneth.christiansen@gmail.com>
- Date: Tue, 26 Nov 2013 16:30:07 +0100
- To: Marcos Caceres <w3c@marcosc.com>
- Cc: Mounir Lamouri <mounir@lamouri.fr>, public-webapps <public-webapps@w3.org>
hi, On Tue, Nov 26, 2013 at 4:25 PM, Marcos Caceres <w3c@marcosc.com> wrote: > On Tuesday, 26 November 2013 at 15:16, Mounir Lamouri wrote: >> Hi, >> >> I got some requests from different organizations to add the ability to >> lock to the 'current' orientation in the Screen Orientation API. >> >> > From Javascript, that would allow writing >> window.screen.lockOrientation('current'); >> instead of >> window.screen.lockOrientation(window.screen.orientation); >> Basically, a syntax sugar. current is nice because it works for the manifest as well. > the one with JavaScript seems more clear to me (as it's more evident that it's dynamically derived). "current" is kinda weird because setting the orientation is an async operation, so by the time you work out what "current" is, it might not longer be the "current" one... so it's kind or a race condition. Why? If it rotating at the moment you call it, it could just fail, if it is not, it could lock immediately. It is no different from using the window.screen.orientation. Kenneth -- Kenneth Rohde Christiansen Web Platform Architect, Intel Corporation. Phone +45 4294 9458 ﹆﹆﹆
Received on Tuesday, 26 November 2013 15:30:36 UTC