[whatwg] Full Screen API Feedback

On 5/12/11 3:24 AM, Jer Noble wrote:
> A) If an author calls requestFullScreen(), at some point in the future they will receive either a "fullscreenchanged" event or a "fullscreendenied" event.
> B) If an author calls requestFullScreen(), at some point in the future they may receive a "fullscreenchanged" event, or not.
>
> I'd argue that A) is easier to grasp.

(A) is easier to grasp incorrectly to.  In practice, "at some point in 
the future" means "maybe you'll get it, or maybe you won't", because for 
any finite time period the future may not have arrived yet.

(B) just makes that explicit so authors don't get confused.

>> I don't necessarily agree with that part of the geolocation API :-).
>
> Fair enough.  But it is an API in relatively wide use now.  Have authors complained that the timing of the error handler is too confusing?

Yes. 
http://stackoverflow.com/questions/5947637/function-fail-never-called-not-if-user-declines-to-share-geolocation-in-firefox 
for example (where the author misunderstood the difference between 
"denied" and "hasn't decided yet").

> True, without the "fullscreendenied" event, authors will be forced to "pre-fallback" to a full-window mode.  But with the "fullscreendenied" event, they can decide whether to do that, or a more traditional post-denial full-window mode.

And what do they do for the arbitrarily long time before getting any 
event at all?

-Boris

Received on Thursday, 12 May 2011 00:31:22 UTC