Skip to main content Skip to docs navigation

Transient Activation

Transient activation (or "transient user activation") is a window state that indicates a user has recently pressed a button, moved a mouse, used a menu, or performed some other user interaction.

On this page

Transient activation

This state is sometimes used as a mechanism for ensuring that a web API can only function if triggered by user interaction. For example, scripts cannot arbitrarily launch a popup that requires transient activation ⁠—it must be triggered from a UI element's event handler.

See Features gated by user activation for examples of APIs that require transient activation .

See the UserActivation.isActive property to programmatically access the current window's transient activation state.

Note: Transient activation expires after a timeout (if not renewed by further interaction), and may also be "consumed" by some APIs. See Sticky activation for a user activation that doesn't reset after it has been set initially.

See also

Updated on April 20, 2024 by Datarist.