---
title: "hasActiveUserGesture(in:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkwebextensioncontext/hasactiveusergesture(in:)"
---

# hasActiveUserGesture(in:)

Indicates if a user gesture is currently active in the specified tab.

## Declaration

```swift
func hasActiveUserGesture(in tab: any WKWebExtensionTab) -> Bool
```

## Parameters

- `tab`: The tab for which to check for an active user gesture.

## Discussion

Discussion An active user gesture may influence the availability of certain permissions, such as activeTab. User gestures can be triggered by various user interactions with the web extension, including clicking on extension menu items, executing extension commands, or interacting with extension actions. A tab as having an active user gesture enables the extension to access features that require user interaction.

## See Also

### Related Documentation

- [userGesturePerformed(in:)](webkit/wkwebextensioncontext/usergestureperformed(in:).md)
