User activation
Newly available since 2023-11-21
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.
To learn more, see
Navigator: userActivation property at MDN.
Compatibility
- Chrome 72 Released on 2019-01-29
- Chrome Android 72 Released on 2019-01-29
- Edge 79 Released on 2020-01-15
- Firefox 120 Released on 2023-11-21
- Firefox for Android 120 Released on 2023-11-21
- Safari 16.4 Released on 2023-03-27
- Safari on iOS 16.4 Released on 2023-03-27
Specifications
- HTML Standard (#the-useractivation-interface), from HTML Workstream (WHATWG).