Skip to content
Merged
Changes from 4 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
45 changes: 44 additions & 1 deletion source
Original file line number Diff line number Diff line change
Expand Up @@ -75753,7 +75753,7 @@ END:VCARD</pre>
seconds, so that the user can possibly perceive the link between an interaction with the page and
the page calling the activation-gated API.</p>

<p>These two values imply two boolean user activation states for <var>W</var>:</p>
<p>These two values imply two boolean <dfn>user activation states</dfn> for <var>W</var>:</p>

<dl>
<dt><dfn export>Sticky activation</dfn></dt>
Expand Down Expand Up @@ -75904,6 +75904,49 @@ END:VCARD</pre>
</dl>


<h4>The <code>UserActivation</code> interface</h4>

<p>The <span>user activation states</span> can be accessed using the <code>UserActivation</code>
interface. Each <code>Window</code> object has a corresponding <code>UserActivation</code> object
which is exposed through <code>navigator</code>'s <code
data-x="dom-Navigator-userActivation">userActivation</code> getter.</p>

<pre><code class="idl">[Exposed=Window]
interface <dfn interface>UserActivation</dfn> {
readonly attribute boolean <span data-x="dom-UserActivation-hasBeenActive">hasBeenActive</span>;
readonly attribute boolean <span data-x="dom-UserActivation-isActive">isActive</span>;
};

partial interface <span id="NavigatorUserActivation-partial">Navigator</span> {
[SameObject] readonly attribute <code>UserActivation</code> <span data-x="dom-Navigator-userActivation">userActivation</span>;
};</code></pre>

<dl class="domintro">
<dt><code data-x=""><span data-x="dom-navigator">navigator</span>.<span subdfn data-x="dom-Navigator-userActivation">userActivation</span>.<span subdfn data-x="dom-UserActivation-hasBeenActive">hasBeenActive</span></code></dt>
<dd>
<p>Returns the state of the <span>sticky activation</span>.</p>
</dd>

<dt><code data-x=""><span data-x="dom-navigator">navigator</span>.<span data-x="dom-Navigator-userActivation">userActivation</span>.<span subdfn data-x="dom-UserActivation-isActive">isActive</span></code></dt>
<dd>
<p>Returns the state of the <span>transient activation</span>.</p>
</dd>
</dl>

<div w-nodev>

<p>The <dfn><code data-x="dom-UserActivation-hasBeenActive">hasBeenActive</code></dfn> getter returns
true if <span>this</span>'s <span>relevant global object</span> has <span>sticky activation</span>;
otherwise false.</p>

<p>The <dfn><code data-x="dom-UserActivation-isActive">isActive</code></dfn> getter returns
true if <span>this</span>'s <span>relevant global object</span> has <span>transient activation</span>;
otherwise false.</p>

<p>The <dfn><code data-x="dom-Navigator-userActivation">userActivation</code></dfn> attribute must
return a live representation of the <span>user activation states</span>.</p>

</div>

<h3 id="activation">Activation behavior of elements</h3>

Expand Down