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

# permissionStatus(for:in:)

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

## Declaration

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

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

### Related Documentation

- [permissionStatus(for:)](webkit/wkwebextensioncontext/permissionstatus(for:)-7ojrb.md)
- [hasAccess(to:in:)](webkit/wkwebextensioncontext/hasaccess(to:in:).md)
