coderef

User activationBaseline · Widely available

The navigator.userActivation API reveals whether the user has interacted with the page through an "activation" gesture such as a click, tap, or key press. User activation gated APIs (such as the fullscreen API) fail without user interaction, and this API allows you to predict such a failure.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Nov 21, 2023. Widely available since May 21, 2026.

Browser support

DesktopChrome
1–71Not supported
72+Supportedsince Jan 29, 2019
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–119Not supported
120+Supportedsince Nov 21, 2023
Current: 157
Safari
1–16.3Not supported
16.4+Supportedsince Mar 27, 2023
Current: 27
MobileChrome Android
18–71Not supported
72+Supportedsince Jan 29, 2019
Current: 155
Firefox Android
4–119Not supported
120+Supportedsince Nov 21, 2023
Current: 157
Safari iOS
1–16.3Not supported
16.4+Supportedsince Mar 27, 2023
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: userActivation.

Feature detection

JS · check before using
if ("UserActivation" in globalThis) {
  // UserActivation is available
} else {
  // load a polyfill or use a fallback
}

Sub-features

Support for each part of the feature (4). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
Navigator.userActivation727912016.47212016.4
UserActivation727912016.47212016.4
UserActivation.hasBeenActive727912016.47212016.4
UserActivation.isActive727912016.47212016.4