Skip to content
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

Add consume user activation of Window #1695

Closed
Closed
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
43 changes: 42 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,12 @@ <h3>Endpoints</h3>
<td><a>Fullscreen Window</a></td>
</tr>

<tr>
<td>POST</td>
<td>/session/{<var>session id</var>}/window/consume-user-activation</td>
<td>[=Consume user activation of Window=]</td>
</tr>

<tr>
<td>GET</td>
<td>/session/{<var>session id</var>}/element/active</td>
Expand Down Expand Up @@ -4039,8 +4045,43 @@ <h4><dfn>Fullscreen Window</dfn></h4>
context</a>.
</ol>
</section> <!-- /Fullscreen Window -->

</section> <!-- /Switch To Window -->
<section>
<h3><dfn>Consume user activation of Window</dfn></h3>

<table class="simple jsoncommand">
<tr>
<th>HTTP Method</th>
<th>URI Template</th>
</tr>
<tr>
<td>POST</td>
<td>/session/{<var>session id</var>}/window/consume-user-activation</td>
</tr>
</table>

<p>The <a>remote end steps</a> are:

<ol>
<li><p>If the <a>current top-level browsing context</a> is <a>no longer open</a>,
return <a>error</a> with <a>error code</a> <a>no such window</a>.

<li><p><a>Handle any user prompts</a> and return its value if it is an <a>error</a>.

<!--
WARNING:
We use explicit data-cite here because this spec is still heavily dependent on the
old concept of browser contexts. DON'T COPY THIS PATTERN!
-->
<li><p>Let |window| be <a>current browsing context</a>'s <a data-cite="html#nav-window">active window</a>.

<li><p>Let |consume| be true if |window| has [=transient activation=] or false otherwise.

<li><p>If |consume| is true, [=consume user activation=] of |window|.

<li><p>Return <a>success</a> with data |consume|.
</ol>
</section> <!-- /Consume User Activation of Window -->
</section> <!-- /Contexts -->

<section>
Expand Down