diff --git a/fullscreen.bs b/fullscreen.bs index c94c0fd..e5a6e8b 100644 --- a/fullscreen.bs +++ b/fullscreen.bs @@ -67,6 +67,14 @@ stated otherwise it is unset.
All documents have an associated list of pending fullscreen events, which is an ordered set of (string, element) tuples. It is initially empty. +
All documents have an associated pending fullscreen request flag. +Unless stated otherwise it is unset. When set, it indicates that the document has an outstanding +fullscreen request that has not yet resolved or been rejected. + +
All documents have an associated pending fullscreen request promise. +Unless stated otherwise it is null. When not null, it is the promise representing the current pending +fullscreen request. +
To fullscreen an element:
Let promise be a new promise. +
Set pendingDoc's pending fullscreen request promise to promise. +
If pendingDoc is not fully active, then reject promise with a {{TypeError}} exception and return promise. @@ -294,6 +304,8 @@ are:
If error is false, then consume user activation given pendingDoc's relevant global object. +
If error is false, set pendingDoc's pending fullscreen request flag. +
Return promise, and run the remaining steps in parallel.
If error is true:
Unset pendingDoc's pending fullscreen request flag. + +
Set pendingDoc's pending fullscreen request promise to null. +
Append ({{fullscreenerror}}, this) to pendingDoc's list of pending fullscreen events. @@ -391,6 +407,10 @@ are:
The order in which elements are fullscreened is not observable, because run the fullscreen steps is invoked in tree order. +
Unset pendingDoc's pending fullscreen request flag. + +
Set pendingDoc's pending fullscreen request promise to null. +
Resolve promise with undefined.