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

# clearUserGesture(in:)

Called by the app to clear a user gesture in a specific tab.

## Declaration

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

## Parameters

- `tab`: The tab from which the user gesture should be cleared.

## Discussion

Discussion When a user gesture is no longer relevant in a tab, this method should be called to update the extension context. This will revoke the extension’s access to features that require active user interaction, such as activeTab. User gestures are automatically cleared during navigation in certain scenarios; this method is needed if the app intends to clear the gesture more aggressively.

## See Also

### Related Documentation

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