-
Notifications
You must be signed in to change notification settings - Fork 48
Add pending fullscreen request flag and promise to document state #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,6 +67,14 @@ stated otherwise it is unset. | |
| <p>All <a for=/>documents</a> have an associated <dfn>list of pending fullscreen events</dfn>, which | ||
| is an <a>ordered set</a> of (<a>string</a>, <a>element</a>) <a>tuples</a>. It is initially empty. | ||
|
|
||
| <p>All <a for=/>documents</a> have an associated <dfn export>pending fullscreen request flag</dfn>. | ||
| 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. | ||
|
|
||
| <p>All <a for=/>documents</a> have an associated <dfn export>pending fullscreen request promise</dfn>. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would prefer it if these follow the existing pattern:
|
||
| Unless stated otherwise it is null. When not null, it is the promise representing the current pending | ||
| fullscreen request. | ||
|
|
||
| <p>To <dfn>fullscreen an <var>element</var></dfn>: | ||
|
|
||
| <ol> | ||
|
|
@@ -266,6 +274,8 @@ are: | |
|
|
||
| <li><p>Let <var>promise</var> be a new promise. | ||
|
|
||
| <li><p>Set <var>pendingDoc</var>'s <a>pending fullscreen request promise</a> to <var>promise</var>. | ||
|
|
||
| <li><p>If <var>pendingDoc</var> is not <a>fully active</a>, then reject <var>promise</var> with a | ||
| {{TypeError}} exception and return <var>promise</var>. | ||
|
|
||
|
|
@@ -294,6 +304,8 @@ are: | |
| <li><p>If <var>error</var> is false, then <a>consume user activation</a> given | ||
| <var>pendingDoc</var>'s <a>relevant global object</a>. | ||
|
|
||
| <li><p>If <var>error</var> is false, set <var>pendingDoc</var>'s <a>pending fullscreen request</a> flag. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. then set |
||
|
|
||
| <li><p>Return <var>promise</var>, and run the remaining steps <a>in parallel</a>. | ||
|
|
||
| <li> | ||
|
|
@@ -342,6 +354,10 @@ are: | |
| <p>If <var>error</var> is true: | ||
|
|
||
| <ol> | ||
| <li><p>Unset <var>pendingDoc</var>'s <a>pending fullscreen request</a> flag. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Set ... to false. |
||
|
|
||
| <li><p>Set <var>pendingDoc</var>'s <a>pending fullscreen request promise</a> to null. | ||
|
|
||
| <li><p><a for=set>Append</a> ({{fullscreenerror}}, <a>this</a>) to | ||
| <var>pendingDoc</var>'s <a>list of pending fullscreen events</a>. | ||
|
|
||
|
|
@@ -391,6 +407,10 @@ are: | |
| <p class=note>The order in which elements are <a lt="fullscreen an element">fullscreened</a> | ||
| is not observable, because <a>run the fullscreen steps</a> is invoked in <a>tree order</a>. | ||
|
|
||
| <li><p>Unset <var>pendingDoc</var>'s <a>pending fullscreen request</a> flag. | ||
|
|
||
| <li><p>Set <var>pendingDoc</var>'s <a>pending fullscreen request promise</a> to null. | ||
|
|
||
| <li><p>Resolve <var>promise</var> with undefined. | ||
| </ol> | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's rename this to "has pending fullscreen request" and make it a boolean. Should also maybe use
for=Document?