<!--
{
  "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:)-96xaf",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKWebExtensionContext(im)permissionStatusForURL:inTab:"
  },
  "title" : "permissionStatus(for:in:)"
}
-->

# permissionStatus(for:in:)

Checks the specified URL against the currently denied, granted, and requested permission match patterns.

```
func permissionStatus(for url: URL, in tab: (any WKWebExtensionTab)?) -> WKWebExtensionContext.PermissionStatus
```

## Parameters

`url`

The URL 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

URLs and match patterns can be granted on a per-tab basis. When the tab is known, access checks should always use this method.

## See Also

[`permissionStatus(for:)`](/documentation/WebKit/WKWebExtensionContext/permissionStatus(for:)-7ojrb)

Checks the specified URL against the currently denied, granted, and requested permission match patterns.

[`hasAccess(to:in:)`](/documentation/WebKit/WKWebExtensionContext/hasAccess(to:in:))

Checks the specified URL against the currently granted permission match patterns 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)