diff --git a/source b/source
index bd725815eb6..3c4b2f9241a 100644
--- a/source
+++ b/source
@@ -30121,8 +30121,8 @@ interface HTMLIFrameElement : HTMLElement {
keyword allows the content to navigate its top-level browsing context;
the A media element is said to be allowed to play if the user agent and the
system allow media playback in the current context. For example, a user agent could require that playback is triggered by user
- activation, but an exception could be made to allow playback while For example, a user agent could allow playback only when transient
+ activation flag is true, but an exception could be made to allow playback while muted. A media element is said to have ended playback when:allow-top-navigation-by-user-activation
- keyword behaves similarly but only allows such navigation when
- triggered by user activation; and the navigation only when
+ transient activation flag is true; and the
allow-forms
, allow-modals
, allow-orientation-lock
, MediaError {
event.
To prevent abuse of certain APIs that could be annoying to users (e.g. opening popups or
+ vibrating phones), Web browsers allow the use of these APIs only when the user is actively
+ interacting with the web page or have interacted with the page at least once. This "active
+ interaction" state is maintained through the user activation state object in each
+ Window
.
The user agent should allow the user to manually trigger elements that have an activation
- behavior, for instance using keyboard or voice input, or through mouse clicks. When the
- user triggers an element with a defined activation behavior in a manner other than
- clicking it, the default action of the interaction event must be to fire a click
event at the element.
An algorithm is triggered by user - activation if any of the following conditions is true:
+A user interaction activates a Window
object
+ W if either:
Window
+ object in a subframe of W.The user activation state of a Window
object W consists of
+ two boolean flags, both of which are initially set to false:
The task in which the algorithm is running is currently
- processing an activation behavior whose click
- event's isTrusted
attribute is true.
Window
object of the page.The task in which the algorithm is running is currently
- running the event listener for an event whose isTrusted
attribute is true and whose type
is one of:
The propagation of the transient activation flag in the frame tree
+ is assymetric between setting vs resetting of the flag. A user interaction with a frame
+ F sets the flag in the Window
object of each ancestor frame of
+ F (including F itself). However, an activation-consuming
+ API call in the context of the Window
object of frame of F resets
+ the flag in all Window
objects across the whole frame tree. This prevents
+ multiple calls to an activation-consuming API even when the frame hierarchy
+ is deep.
change
click
contextmenu
dblclick
mouseup
pointerup
reset
submit
touchend
APIs that are dependent on user activation state are classified into three + different levels. The levels are as follows, sorted by their "strength of dependence" on user + activation (from strongest to weakest):
+The task in which the algorithm is running was queued by an algorithm that was triggered by user - activation, and the chain of such algorithms started within a user-agent defined - timeframe.
+For example, if a user clicked a button, it might be acceptable for a popup - to result from that after 4 seconds, but it would likely not be acceptable for a popup to result - from that after 4 hours.
- +The event set is inconsistent across major browsers. See issue #3849.
+ +A Window
object W is considered activated when W or any
+ elements of W receives an event whose isTrusted
attribute is true and whose type
is one of:
change
click
contextmenu
dblclick
mouseup
pointerup
reset
submit
touchend
Certain elements in HTML have an activation behavior, which means that the user
+ can activate them. This is always caused by a click
event.
The user agent should allow the user to manually trigger elements that have an activation
+ behavior, for instance using keyboard or voice input, or through mouse clicks. When the
+ user triggers an element with a defined activation behavior in a manner other than
+ clicking it, the default action of the interaction event must be to fire a click
event at the element.
If this algorithm is triggered by user activation and A's +
If transient activation flag is true and A's active document's active sandboxing flag set has its sandboxed top-level navigation with user activation browsing context flag set, then return false.
Otherwise, if this algorithm is not triggered by user activation and +
Otherwise, if transient activation flag is false and A's active document's active sandboxing flag set has its sandboxed top-level navigation without user activation browsing context flag set, then return false.