Hi.
On Mon, 16 Jun 2014 15:08:02 -0700 (PDT)
Sam MacPherson <
xyl...@gmail.com> wrote:
> function requestFullScreen ():Void {
> untyped __js__("if (document.documentElement.requestFullscreen)
> document.documentElement.requestFullscreen(); else if
> (document.documentElement.mozRequestFullScreen)
> document.documentElement.mozRequestFullScreen(); else if
> (document.documentElement.webkitRequestFullscreen)
> document.documentElement.webkitRequestFullscreen(); else if
> (document.documentElement.msRequestFullscreen)
> document.documentElement.msRequestFullscreen();");
> }
Should work, but not a very good approach IMO. I think it's better to
check the API once and not on every function call.
BTW: You're missing older webkit (Chrome < 20, Safari < 6) with this
where it's webkitRequestFullScreen (not so important anymore, probably).
Also the question was actually about enterFullScreen, which is something
else.
--
Mockey