Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions fullscreen.bs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ 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 a <dfn for=Document lt="has pending fullscreen request|pending fullscreen request" export>
pending fullscreen request</dfn>, which is a boolean. It is initially false.

<p>All <a for=/>documents</a> have an associated <dfn for=Document export>pending fullscreen request promise</dfn>,
which is a nullable {{Promise}}. It is initially null. It represents the current pending
fullscreen request.

<p>To <dfn>fullscreen an <var>element</var></dfn>:

<ol>
Expand Down Expand Up @@ -265,10 +272,14 @@ are:
<ol>
<li><p>Let <var>pendingDoc</var> be <a>this</a>'s <a>node document</a>.

<li><p>Let <var>promise</var> be a new promise.

<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>.
<li><p>Let <var>promise</var> be [=a new promise=] in [=this=]'s [=relevant realm=].

<li><p>Set <var>pendingDoc</var>'s [=Document/pending fullscreen request promise=] to <var>promise</var>.

<li><p>If <var>pendingDoc</var> is not <a>fully active</a>, then set <var>pendingDoc</var>'s
[=Document/pending fullscreen request promise=] to null, reject <var>promise</var> with a
{{TypeError}} exception, and return <var>promise</var>.

<li><p>Let <var>error</var> be false.

Expand All @@ -295,6 +306,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, then set <var>pendingDoc</var>'s [=Document/pending fullscreen request=] to true.

<li><p>Return <var>promise</var>, and run the remaining steps <a>in parallel</a>.

<li>
Expand Down Expand Up @@ -343,6 +356,10 @@ are:
<p>If <var>error</var> is true:

<ol>
<li><p>Set <var>pendingDoc</var>'s [=Document/pending fullscreen request=] to false.

<li><p>Set <var>pendingDoc</var>'s [=Document/pending fullscreen request promise=] 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>.

Expand Down Expand Up @@ -392,6 +409,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>Set <var>pendingDoc</var>'s [=Document/pending fullscreen request=] to false.

<li><p>Set <var>pendingDoc</var>'s [=Document/pending fullscreen request promise=] to null.

<li><p>Resolve <var>promise</var> with undefined.
</ol>

Expand Down
Loading