>On 3/13/14 10:59 AM, "Mounir Lamouri" <mou...@lamouri.fr> wrote: > >>I recently landed a usage counter for window.orientation. It will take >>some time to roll to Chrome Android stable but hopefully we will find >>out if window.orientation is actually used a lot. If that's the case and >>other UA want to implement it, we could incorporate that into this >>specification. In any case, I would like to add this feature but not as >>|window.orientation|. >> >> >>Your use case will be taken care of, see this bug: >>https://www.w3.org/Bugs/Public/show_bug.cgi?id=24698 > >You could alternatively just have a 'natural' orientation boolean flag, >to help assessing the angle at the initial rotation level >(without having to first rotate to find out). > >The flag would also add the ability to lock to the "natural" orientation. > >My main rebuttal of the orientation values is not the lack of angle, but >rather the lack of instant identification of this 'natural' orientation >state. We can figure out the mapping to angles with such a flag. > >So should it a better or easier implementation option, perhaps avoiding >redundancy, that would work too, and the only thing needed to address my >case.
If you are going to leave it up to the UA. As per the recent change: --- Comment #1 from Mounir Lamouri <mou...@lamouri.fr> --- *-primary and *-secondary is now entirely up to the UA: https://dvcs.w3.org/hg/screen-orientation/rev/5397f6ae4528 Ignore my previous/above comment. A flag won't work anymore. The notion of left and right is lost under this new spec change, with the concept of orientation being very different from what it was. I have to scrap mapping to angles, that change deprecates my code. I'll wait until we have angles, or for Mozilla and IE to implement window.orientation for mobile.