The parameters for creating the delegated Permissions API.
The Permissions APIs to delegate to.
The list must have at least one delegate, which will be selected initially. The list is static, and cannot be changed after the delegated API is created.
The delegated Permissions API, and a handle for controlling it.
Readonly
handle: DelegatedPermissionsHandleA handle for controlling the delegated Permissions API.
Readonly
permissions: PermissionsThe delegated Permissions API.
A TypeError if no delegates are provided.
Create a Permissions API that delegates to other Permissions APIs.
Delegated Permissions APIs can be used, for example, to dynamically "switch" between a fake Permissions API and a real Permissions API.
When Permissions.query is called on the delegated Permissions API, the resulting PermissionStatus will reflect the PermissionState of the permission in the selected delegate.
Permissions API delegates can be selected dynamically at any time, and any PermissionStatus queries will immediately update to reflect the new delegate's PermissionState for the relevant permission, dispatching events as appropriate to any registered
change
listeners.