[whatwg] Fullscreen revision I

Glenn Maynard glenn at zewt.org
Mon Oct 24 08:32:43 PDT 2011

On Mon, Oct 24, 2011 at 6:38 AM, Anne van Kesteren <annevk at opera.com> wrote:

> On Fri, 21 Oct 2011 06:44:05 +0900, Chris Pearce <cpearce at mozilla.com>
> wrote:
>> 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?
> Why should we allow this if nobody intents on implementing it?

Doing this synchronously means nobody can ever implement ask-first.  Don't
permanently lock everyone into a permission scheme with known problems.

It also seems odd that fullscreenElement is set synchronously, but
fullscreenchange events are fired asynchronously.  It would make more sense
to do them together, from the same task (set all fullscreenElements first,
then fire all fullscreenchange events).

 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.
> I made this change for now to keep the initial version simple.

This is much more complicated for developers.  If fullscreenEnabled can
change, you have to monitor it to change UI (eg. show/hide fullscreen

How is this simpler than just making requestFullscreen switch the fullscreen

Glenn Maynard

More information about the whatwg mailing list