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.

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.  
> > From the manifest, writing the following
> 
> 'orientation': 'current',

Apps can have multiple orientations and it appears to be somewhat media query 
dependent. I'm cooking up something different for the manifest but would like 
terms to align. 



Reply via email to