<!--
{
  "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/hasPermission(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKWebExtensionContext(im)hasPermission:"
  },
  "title" : "hasPermission(_:)"
}
-->

# hasPermission(_:)

Checks the specified permission against the currently granted permissions.

```
func hasPermission(_ permission: WKWebExtension.Permission) -> Bool
```

## Parameters

`permission`

The permission for which to return the status.

## See Also

[`currentPermissions`](/documentation/WebKit/WKWebExtensionContext/currentPermissions)

The currently granted permissions that have not expired.

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

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

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

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

[`permissionStatus(for:in:)`](/documentation/WebKit/WKWebExtensionContext/permissionStatus(for:in:)-4h82n)

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



---

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)