UserActivation: isActive property
HTML DOM
HTML DOM
The read-only **`isActive`** property of the UserActivation interface indicates whether the current window has transient user activation.
## Value
A boolean.
## Examples
### Checking if a user gesture was recently performed
Use the `isActive` property to check whether the user is currently interacting with the page.
```js
if (navigator.userActivation.isActive) {
// proceed to request playing media, for example
}
```
## Specifications
## Browser compatibility
## See also
- UserActivation
- UserActivation.hasBeenActive
- [Features gated by user activation](/docs/Web/Security/Defenses/User_activation)
source: MDN Web Docs mirror · page
Cite this
"UserActivation: isActive property". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/UserActivation/isActive