Skip to content
Merged
Changes from 3 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
44 changes: 43 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,48 @@ END:VCARD</pre>
</dl>


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

<p>The <span>user activation states</span> are exposed via the <code>UserActivation</code>
interface. The <code>UserActivation</code> object accessed via <code>navigator</code>'s <code
data-x="dom-Navigator-userActivation">userActivation</code> property is live, in that changes
in the <span>user activation states</span> will be reflected in the properties of the
object.</p>

<pre><code class="idl">[Exposed=(Window,Worker,AudioWorklet)]
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> attribute
must return the state of the <span>sticky activation</span>.</p>

<p>The <dfn><code data-x="dom-UserActivation-isActive">isActive</code></dfn> attribute must return
the state of the <span>transient activation</span>.</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