---
title: "shouldGrantPermissionsOnUserGesture(for:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkwebextensiontab/shouldgrantpermissionsonusergesture(for:)"
---

# shouldGrantPermissionsOnUserGesture(for:)

Called to determine if permissions should be granted for the tab on user gesture.

## Declaration

```swift
optional func shouldGrantPermissionsOnUserGesture(for context: WKWebExtensionContext) -> Bool
```

## Parameters

- `context`: The context in which the web extension is running.

## Discussion

Discussion This method allows the app to control granting of permissions on a per-tab basis when triggered by a user gesture. Implementing this method enables the app to dynamically manage activeTab permissions based on the tab’s current state, the content being accessed, or other custom criteria.
