Permissions Class

The Permissions API of a window or a worker (https://w3c.github.io/permissions/#permissions-interface, navigator.permissions): the states of the permissions of the powerful features, read from the PermissionStore of the browsing context (BrowsingContextOptions.Permissions).

public sealed class Permissions

Methods

NameDescription
Query(PermissionDescriptor)Returns the state of a permission (https://w3c.github.io/permissions/#dom-permissions-query). The task fails with an InvalidStateError DomException when the document is not fully active, and with a TypeErrorException when the feature is not supported.

Query(PermissionDescriptor)

Permissions.cs

Returns the state of a permission (https://w3c.github.io/permissions/#dom-permissions-query). The task fails with an InvalidStateError DomException when the document is not fully active, and with a TypeErrorException when the feature is not supported.

public Task<PermissionStatus> Query(PermissionDescriptor permissionDescriptor)

Parameters

permissionDescriptor PermissionDescriptor
The descriptor of the permission.

Returns

Task<PermissionStatus>

See also