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.
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. * available since Chrome 36 * https://developer.chrome.com/apps/permissions
(contains permissions)
Checks if the extension has the specified permissions.
|permissions| - https://developer.chrome.com/apps/permissions#property-contains-permissions.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - True if the extension has the specified permissions. If an origin is specified as both an optional permission and a content script match pattern, this will return false unless both permissions are granted.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/permissions#method-contains.
Checks if the extension has the specified permissions. |permissions| - https://developer.chrome.com/apps/permissions#property-contains-permissions. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - True if the extension has the specified permissions. If an origin is specified as both an optional permission and a content script match pattern, this will return false unless both permissions are granted. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/permissions#method-contains.
(get-all)
Gets the extension's current set of permissions.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [permissions] where:
|permissions| - The extension's active permissions. Note that the origins property will contain granted origins from those specified in the permissions and optional_permissions keys in the manifest and those associated with Content Scripts.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/permissions#method-getAll.
Gets the extension's current set of permissions. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [permissions] where: |permissions| - The extension's active permissions. Note that the origins property will contain granted origins from those specified in the permissions and optional_permissions keys in the manifest and those associated with Content Scripts. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/permissions#method-getAll.
(remove permissions)
Removes access to the specified permissions. If there are any problems removing the permissions, 'runtime.lastError' will be set.
|permissions| - https://developer.chrome.com/apps/permissions#property-remove-permissions.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [removed] where:
|removed| - True if the permissions were removed.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/permissions#method-remove.
Removes access to the specified permissions. If there are any problems removing the permissions, 'runtime.lastError' will be set. |permissions| - https://developer.chrome.com/apps/permissions#property-remove-permissions. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [removed] where: |removed| - True if the permissions were removed. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/permissions#method-remove.
(request permissions)
Requests access to the specified permissions, displaying a prompt to the user if necessary. These permissions must either be defined in the optional_permissions field of the manifest or be required permissions that were withheld by the user. Paths on origin patterns will be ignored. You can request subsets of optional origin permissions; for example, if you specify :///* in the optional_permissions section of the manifest, you can request http://example.com/. If there are any problems requesting the permissions, 'runtime.lastError' will be set.
|permissions| - https://developer.chrome.com/apps/permissions#property-request-permissions.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [granted] where:
|granted| - True if the user granted the specified permissions.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/permissions#method-request.
Requests access to the specified permissions, displaying a prompt to the user if necessary. These permissions must either be defined in the optional_permissions field of the manifest or be required permissions that were withheld by the user. Paths on origin patterns will be ignored. You can request subsets of optional origin permissions; for example, if you specify *://*/* in the optional_permissions section of the manifest, you can request http://example.com/. If there are any problems requesting the permissions, 'runtime.lastError' will be set. |permissions| - https://developer.chrome.com/apps/permissions#property-request-permissions. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [granted] where: |granted| - True if the user granted the specified permissions. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/permissions#method-request.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.app.permissions namespace.
Taps all valid non-deprecated events in chromex.app.permissions namespace.
(tap-on-added-events channel & args)
Fired when the extension acquires new permissions.
Events will be put on the |channel| with signature [::on-added [permissions]] where:
|permissions| - The newly acquired permissions.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/permissions#event-onAdded.
Fired when the extension acquires new permissions. Events will be put on the |channel| with signature [::on-added [permissions]] where: |permissions| - The newly acquired permissions. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/permissions#event-onAdded.
(tap-on-removed-events channel & args)
Fired when access to permissions has been removed from the extension.
Events will be put on the |channel| with signature [::on-removed [permissions]] where:
|permissions| - The permissions that have been removed.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/permissions#event-onRemoved.
Fired when access to permissions has been removed from the extension. Events will be put on the |channel| with signature [::on-removed [permissions]] where: |permissions| - The permissions that have been removed. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/permissions#event-onRemoved.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close