Liking cljdoc? Tell your friends :D

chromex.ext.permissions

clj

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 30
  * https://developer.chrome.com/extensions/permissions
raw docstring

api-tableclj

source

containsclj/smacro

(contains permissions)

Checks if the extension has the specified permissions.

|permissions| - https://developer.chrome.com/extensions/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/extensions/permissions#method-contains.

Checks if the extension has the specified permissions.

  |permissions| - https://developer.chrome.com/extensions/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/extensions/permissions#method-contains.
sourceraw docstring

contains*cljs

(contains* config permissions)
source

gen-callclj

source

gen-wrapclj/smacro

(gen-wrap kind item-id config & args)
source

get-allclj/smacro

(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/extensions/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/extensions/permissions#method-getAll.
sourceraw docstring

get-all*cljs

(get-all* config)
source

on-added*cljs

(on-added* config channel & args)
source

on-removed*cljs

(on-removed* config channel & args)
source

removeclj/smacro

(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/extensions/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/extensions/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/extensions/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/extensions/permissions#method-remove.
sourceraw docstring

remove*cljs

(remove* config permissions)
source

requestclj/smacro

(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/extensions/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/extensions/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/extensions/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/extensions/permissions#method-request.
sourceraw docstring

request*cljs

(request* config permissions)
source

tap-all-eventsclj/smacro

(tap-all-events chan)

Taps all valid non-deprecated events in chromex.ext.permissions namespace.

Taps all valid non-deprecated events in chromex.ext.permissions namespace.
sourceraw docstring

tap-on-added-eventsclj/smacro

(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/extensions/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/extensions/permissions#event-onAdded.
sourceraw docstring

tap-on-removed-eventsclj/smacro

(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/extensions/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/extensions/permissions#event-onRemoved.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close