<!--
{
  "availability" : [
    "iOS: 18.4.0 -",
    "iPadOS: 18.4.0 -",
    "macCatalyst: 18.4.0 -",
    "macOS: 15.4.0 -",
    "visionOS: 2.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKWebExtensionContext/permissionStatus(for:in:)-4h82n",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKWebExtensionContext(im)permissionStatusForPermission:inTab:"
  },
  "title" : "permissionStatus(for:in:)"
}
-->

# permissionStatus(for:in:)

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

```
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

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

## See Also

[`permissionStatus(for:)`](/documentation/WebKit/WKWebExtensionContext/permissionStatus(for:)-3qq2w)

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

[`hasPermission(_:in:)`](/documentation/WebKit/WKWebExtensionContext/hasPermission(_:in:))

Checks the specified permission against the currently granted permissions in a specific tab.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)