[whatwg] [fullscreen] cancelFullScreen()

Anne van Kesteren annevk at opera.com
Wed Oct 12 21:23:29 PDT 2011


On Thu, 13 Oct 2011 11:26:20 +0900, Chris Pearce <cpearce at mozilla.com>  
wrote:
> On 12/10/2011 10:35 p.m., Anne van Kesteren wrote:
>> Is cancelFullScreen() synchronous or should it queue a task?
>
> Synchronous, so that Document.fullScreen immediately reflects the state  
> change? Why would it need to be asynchronous?

Is the event dispatched synchronously as well then? I was thinking that  
maybe you want to trigger an animation here of some kind. Though I suppose  
that could be done synchronously as well.


>> If you invoke cancelFullScreen() on a Document of a parent or child  
>> browsing context from the browsing context in whose Document  
>> requestFullScreen() was invoked it should presumably still work, no?
>
> The parent of a Document which is in full-screen will also be in  
> full-screen mode. So if cancelFullScreen() is invoked in the parent  
> Document, it should exit full-screen in the parent. I interpreted the  
> spec to mean if one full-screen document cancels full-screen, all  
> documents in the tree exit full-screen mode.
>
> I too have been wondering if we should honour calls to  
> cancelFullScreen() in a non-full-screen child Document of the Document  
> which requested full-screen.

It seems to me that "being fullscreen" is a property of the top-level  
browsing context. All that is potentially associated with a document is  
the "fullscreen element". If you have a document A with two sub-documents  
B and C, it does not make much sense to me that if you go fullscreen from  
B, C would not report as "being fullscreen". I mean sure, there is no  
"fullscreen element" but it is definitely rendered fullscreen.


>> Presumably also if the Document has been navigated away from.
>
> FWIW we're planing to exit full-screen when a full-screen document is  
> navigated. Probably a good idea to spec this so it's consistently  
> implemented.

Okay.


-- 
Anne van Kesteren
http://annevankesteren.nl/



More information about the whatwg mailing list