Contents

hasPermission(_:in:)

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

Declaration

func hasPermission(_ permission: WKWebExtension.Permission, in tab: (any WKWebExtensionTab)?) -> Bool

Parameters

  • permission:

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

Permissions can be granted on a per-tab basis. When the tab is known, permission checks should always use this method.

See Also

Related Documentation