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

# hasAccess(to:)

Checks the specified URL against the currently granted permission match patterns.

```
func hasAccess(to url: URL) -> Bool
```

## Parameters

`url`

The URL for which to return the status.

## See Also

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

The currently granted permission match patterns that have not expired.

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

Checks the specified URL against the currently granted permission match patterns in a specific tab.

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

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

[`permissionStatus(for:in:)`](/documentation/WebKit/WKWebExtensionContext/permissionStatus(for:in:)-96xaf)

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

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

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

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

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



---

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)