Contents

hasAccess(to:in:)

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

Declaration

func hasAccess(to url: URL, in tab: (any WKWebExtensionTab)?) -> Bool

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

Some 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