So I’m doing this android webapp at work and its awesome and deployed to some 200 tablets and all I want is to run it fullscreen on all of them.
- I can’t switch to a native app, too high of a cost.
- Same goes for making a phone gap app.
- The Android native browser has a labs feature called “Quick Controls” that does fullscreen. But those controls are FUBAR for a whole different slew of reasons.
My coworker then says,
“What about the full screen API?”
According to MDN this is what it is
Given an element that you’d like to present in fullscreen mode (such as a <video>, for example), you can present it in fullscreen mode by simply calling its requestFullscreen() method; this method is implemented in Gecko as element.mozRequestFullScreen() and in WebKit as element.webkitRequestFullscreen().
And I’m like:
Except I’m wanting to fullscreen the first child of the body tag so I do this:
Which just returns undefined and nothing happens. I’m like
But not to worry, I’m a programmer and I solve problems, so I google, stackOverflow and tries out a bunch of combinations and none work. But using it on an image works great.
My conclusion is that the API is flawed for the web of apps.
W3C, this ones for you: