A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userActivation below:

Navigator: userActivation property - Web APIs

Navigator: userActivation property

Baseline 2023

Newly available

The read-only userActivation property of the Navigator interface returns a UserActivation object which contains information about the current window's user activation state.

Value

A UserActivation object.

Examples Checking if a user gesture was recently performed

Use UserActivation.isActive to check whether the user is currently interacting with the page (Transient activation).

if (navigator.userActivation.isActive) {
  // proceed to request playing media, for example
}
Checking if a user gesture was ever performed

Use UserActivation.hasBeenActive to check whether the user has ever interacted with the page (Sticky activation).

if (navigator.userActivation.hasBeenActive) {
  // proceed with auto-playing an animation, for example
}
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3