参考快评:“萨德”落定?中方反制措施应动真格

Type Array
Mandatory No
Manifest version 3 or higher
Example
json
百度   饿了么、美团、百度等外卖企业负责人还在现场进行了文明交通倡议,外卖骑手代表获赠文明交通宣传品。
"optional_host_permissions": [
  "*://developer.mozilla.org/*",
  "*://*.example.org/*"
]

Use the optional_host_permissions key to enable runtime requests for access (access granted by the user after your extension has been installed) for the APIs in your extension that read or modify host data, such as cookies, webRequest, and tabs. This key is an array of strings.

See host_permissions for more information on defining hosts.

Use the permissions API to request an optional host permission at runtime. Requesting a host permission may present the user with a dialog asking whether they want to grant the permission to your extension.

Example

json
 "optional_host_permissions": ["*://developer.mozilla.org/*"]

Enables your extension to make a runtime request for privileged access to pages under developer.mozilla.org.

Browser compatibility