Re: [whatwg/fullscreen] Add pending fullscreen request flag and promise to document state (PR #251)

@annevk commented on this pull request.

I vaguely recall promises not being a great building block for specifications, but I can't find the specific issue for this.

> @@ -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>.

Let's rename this to "has pending fullscreen request" and make it a boolean. Should also maybe use `for=Document`?

> @@ -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.

then set

> @@ -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.

Set ... to false.

> @@ -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>.

I would prefer it if these follow the existing pattern:

> All documents have an associated X, which is a Y. It is initially Z.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fullscreen/pull/251#pullrequestreview-3388843884
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fullscreen/pull/251/review/3388843884@github.com>

Received on Tuesday, 28 October 2025 13:52:09 UTC