diff --git a/source b/source index f839d5d391c..488c1d4d724 100644 --- a/source +++ b/source @@ -73335,7 +73335,7 @@ END:VCARD seconds, so that the user can possibly perceive the link between an interaction with the page and the page calling the activation-gated API.
-These two values imply two boolean user activation states for W:
+These two values imply two boolean user activation states for W:
UserActivation interfaceThe user activation states are exposed via the UserActivation
+ interface. UserActivation objects can be created either as a live or snapshot object,
+ it depends on how the object was referenced. Objects accessed via navigator's userActivation attribute are live, in that changes
+ will in the user activation states will be reflected in the attributes of the object.
+ UserActivation objects retrieved via MessageEvent's userActivation attribute will be snapshot objects,
+ that is a snapshot of the source's state.
[Exposed=(Window,Worker,AudioWorklet)]
+interface UserActivation {
+ readonly attribute boolean hasBeenActive;
+ readonly attribute boolean isActive;
+};
+
+partial interface {
+ [SameObject] readyonly attribute UserActivation userActivation;
+};
+
+ userActivationReturns the a live object representing the current user activation states.
+ +hasBeenActiveReturns the state of the sticky activation.
+ +isActiveReturns the state of the transient activation.
+ +The hasBeenActive attribute
+ must return the state of the sticky activation. If the object is live it must
+ always reflect the current state. If the object is a snapshot it must reflect the state at which
+ the time the object was created.
The isActive attribute must return
+ the state of the transient activation. If the object is live it must always
+ reflect the current state. If the object is a snapshot it must reflect the state at which the time
+ the object was created.
The userActivation attribute must
+ return a live representation of the user activation states.
userActivationReturns a snapshot of the UserActivation state in the
+ source at the time of postMessage().
MessagePort array being sent.
+ The userActivation attribute
+ must return the value it was initialized to. It represents the UserActivation state
+ at the source.
The Let userActivationSnapshot be null If options's Let targetOrigin be options["initMessageEvent()
method must initialize the event in a manner analogous to the similarly-named
+ includeUserActivation member is true, set
+ userActivationSnapshot to be incumbent settings's global object's (if
+ available) user activation states.targetOrigin"].source attribute initialized to source, the
data attribute initialized to
- messageClone, and the ports attribute
- initialized to newPorts.
ports attribute
+ initialized to newPorts, and the userActivation attribute initialized to
+ userActivationSnapshot.
@@ -99140,6 +99231,7 @@ interface MessagePort : EventTarget {
dictionary PostMessageOptions {
sequence<object> transfer = [];
+ boolean includeUserActivation = false;
};
MessagePort, then throw a "DataCloneError"
DOMException.
+ Let userActivationSnapshot be null.
Let incumbent settings be the incumbent settings object.
If options's includeUserActivation member is true, set
+ userActivationSnapshot to be incumbent settings's global object's (if
+ available) user activation states.
Let doomed be false.
If targetPort is not null and transfer Fire an event named message at finalTargetPort, using
MessageEvent, with the data attribute
- initialized to messageClone and the ports attribute initialized to
- newPorts.
ports
+ attribute initialized to newPorts, and the userActivation attribute initialized to
+ userActivationSnapshot.
@@ -99430,6 +99531,11 @@ dictionary PostMessageOptions {
message queue must be enabled, as if the start()
method had been called.
+ If a MessagePort object's onmessage IDL attribute is set, the port's port
+ message queue must be enabled, as if the start()
+ method had been called.