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

# userGesturePerformed(in:)

Should be called by the app when a user gesture is performed in a specific tab.

## Declaration

```swift
func userGesturePerformed(in tab: any WKWebExtensionTab)
```

## Parameters

- `tab`: The tab in which the user gesture was performed.

## Discussion

Discussion When a user gesture is performed in a tab, this method should be called to update the extension context. This enables the extension to be aware of the user gesture, potentially granting it access to features that require user interaction, such as activeTab. Not required if using performAction(for:).

## See Also

### Related Documentation

- [hasActiveUserGesture(in:)](webkit/wkwebextensioncontext/hasactiveusergesture(in:).md)
