permissions property

JSPermissions get permissions

Use the chrome.permissions API to request declared optional permissions at run time rather than install time, so users understand why the permissions are needed and grant only those that are necessary.

Implementation

JSPermissions get permissions {
  var permissionsNullable = this.permissionsNullable;
  if (permissionsNullable == null) {
    throw ApiNotAvailableException('chrome.permissions');
  }
  return permissionsNullable;
}