[whatwg] Fullscreen revision I

Chris Pearce cpearce at mozilla.com
Thu Oct 20 14:44:05 PDT 2011

On 21/10/2011 4:10 a.m., Glenn Maynard wrote:
> The current spec doesn't seem to allow asking permission to fullscreen in
> advance, since the fullscreen element is set synchronously.  This should be
> supported; there are a lot of potential problems with the ask-after model
> and it shouldn't be the only model supported.

I agree, the spec should definitely allow this. We could make 
requestFullScreen()'s entire body run in a synchronous section, after 
any permission has been granted?

> On Thu, Oct 20, 2011 at 6:59 AM, Anne van Kesteren<annevk at opera.com>  wrote:
>> * requestFullscreen() can no longer be invoked when already in "element
>> fullscreen"
> How do you change the fullscreenElement from one element to another without
> exiting fullscreen first?  That seems important.

If you have the fullscreen element as a generic container (div), you can 
insert your desired "fullscreen element" as the only child of the actual 
fullscreen element to get the swap effect. This won't work cross origin, 
so would prevent (for example) embedded YouTube videos from going 
fullscreen. I'd prefer for requestFullscreen() while fullscreen to just 
swap the fullscreen element.

However, if we do end up not having requestFullscreen() while fullscreen 
swap the fullscreen element, then we need to ensure 
document.fullscreenEnabled returns false while any document is 
fullscreen. Otherwise <video> controls won't know to hide their 
(non-functioning) fullscreen buttons while their 
document/parent/ancestor documents are fullscreen.

Chris Pearce.

More information about the whatwg mailing list