---
title: "permissionStatus(for:in:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkwebextensioncontext/permissionstatus(for:in:)-4h82n"
---

# permissionStatus(for:in:)

Checks the specified permission against the currently denied, granted, and requested permissions.

## Declaration

```swift
func permissionStatus(for permission: WKWebExtension.Permission, in tab: (any WKWebExtensionTab)?) -> WKWebExtensionContext.PermissionStatus
```

## Parameters

- `permission`: The permission for which to return the status.
- `tab`: The tab in which to return the permission status, or nil if the tab is not known or the global status is desired.

## Discussion

Discussion Permissions can be granted on a per-tab basis. When the tab is known, access checks should always specify the tab.

## See Also

### Related Documentation

- [permissionStatus(for:)](webkit/wkwebextensioncontext/permissionstatus(for:)-3qq2w.md)
- [hasPermission(_:in:)](webkit/wkwebextensioncontext/haspermission(_:in:).md)
