What message is generated by the chrome “permissio

2019-09-08 08:43发布

问题:

Given a manifest containing the following "permissions" array, what message can a user expect to see when installing an extension with this permission in Chrome?

{
  "name": "My extension",
  ...
  "permissions": [
    "http://www.google.com/"
  ],
  ...
}

回答1:

Visit chrome://extensions, search for your extension and click on "Details" ("Permissions" in Chrome 40 and earlier). That will display a screen with the permission warnings that you'd see if the user installs the extension.

You can also use the chrome.management.getPermissionWarningsByManifest method to get a list of permission warnings for a given string that contains the contents of the manifest file.