setPermission method
Future<void>
setPermission(
- PermissionDescriptor permission,
- PermissionSetting setting, {
- String? origin,
- BrowserContextID? browserContextId,
Set permission settings for given origin.
permission
Descriptor of permission to override.
setting
Setting of the permission.
origin
Origin the permission applies to, all origins if not specified.
browserContextId
Context to override. When omitted, default browser context is used.
Implementation
Future<void> setPermission(
PermissionDescriptor permission, PermissionSetting setting,
{String? origin, BrowserContextID? browserContextId}) async {
await _client.send('Browser.setPermission', {
'permission': permission,
'setting': setting,
if (origin != null) 'origin': origin,
if (browserContextId != null) 'browserContextId': browserContextId,
});
}