[whatwg] Forcing orientation in content
Charles McCathie Nevile
chaals at yandex-team.ru
Wed Apr 17 16:03:08 PDT 2013
On Thu, 18 Apr 2013 01:52:47 +0300, David Bruant <bruant.d at gmail.com>
> Currently working on a web project where tablet support (iPad
> especially) is important, I'm facing a need which apparently the
> platform doesn't support.
> I would need to lock the screen in landscape mode.
Not sure if WHATWG is doing anything, but in the W3C there is
the Web Apps group (by Mounir, who works on Firefox OS as a day job)
I expect to know a bit more about the implementation status of this in
about a week, when the group has a face to face meeting.
> I've been searching and StackOverflow suggested this is not possible
> . The best solution that I have read online was to listen to
> orientation changes, update an "orient" attribute (on <body> or <html>)
> and change the CSS based on that. Or Media Queries. But I don't really
> should. Especially given that in some comments , it is suggested that
> it is possible to lock the orientation in native apps.
> Beyond my current project, I have participated to a "FirefoxOS app days"
> in Bucharest (helped people developing their apps mostly answering their
> questions). A participant wanted to port his website (games for ~5yo
> kids) as an FirefoxOS app and told me clearly that if he had no way to
> lock the screen in landscape, he wouldn't be interested in FirefoxOS
> (pretty sharp opinion, but that's what he said). Fortunately, that's
> possible, but one has to use metadata to do so .
> So I feel the need is there.
> I was wondering if it would be possible to add a <meta> (or whatever
> else is felt more relevant) to lock the orientation declaratively. It
> sounds like an information that belongs to the <head>. I feel the
> FirefoxOS experience  sets a good example.
>  https://developer.mozilla.org/en-US/docs/Apps/Manifest#orientation
Charles McCathie Nevile - Consultant (web standards) CTO Office, Yandex
chaals at yandex-team.ru Find more at http://yandex.com
More information about the whatwg