Baseline 2023
Newly available
The read-only hasBeenActive
property of the UserActivation
interface indicates whether the current window has sticky user activation.
A boolean.
Examples Checking if a user gesture was ever performedUse the hasBeenActive
property to check whether the user has interacted with the page since it was loaded.
js
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