Movatterモバイル変換


[0]ホーム

URL:


  1. Glossary
  2. Transient activation

Transient activation

Transient activation (or "transient user activation") is a window state that indicates a user has recently directly and meaningfully interacted with the window.

The state is enabled following any user interaction, when the window has focus, that results in the browser generating one or more of the following:

  • Amousedown orpointerdown event for a mouse.
  • Apointerup event for any other kind of pointer.
  • Atouchend event.
  • Akeydown event, other than for the escape or browser shortcut keys.

The window is not user-activated by events that aren't necessarily caused by intentional interaction with the window, such as mouse move events orwheel events.

Transient activation expires after a timeout (if not renewed by further interaction), and may also be consumed/deactivated after using some gated features (such asWindow.open()).

Transient activation is commonly 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 requirestransient activation ⁠— it must be triggered from a UI element's event handler.SeeFeatures gated by user activation for information about APIs that requiretransient activation.

TheUserActivation.isActive property can be used to programmatically check the current window's transient activation state.

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp