Liking cljdoc? Tell your friends :D

chromex.ext.notifications

clj

Use the chrome.notifications API to create rich notifications using templates and show these notifications to users in the system tray.

Use the chrome.notifications API to create rich notifications
using templates and show these notifications to users in the system tray.

  * available since Chrome 28
  * https://developer.chrome.com/extensions/notifications
raw docstring

api-tableclj

source

clearclj/smacro

(clear notification-id)

Clears the specified notification.

|notification-id| - The id of the notification to be cleared. This is returned by 'notifications.create' method.

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 [was-cleared] where:

|was-cleared| - https://developer.chrome.com/extensions/notifications#property-callback-wasCleared.

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/notifications#method-clear.

Clears the specified notification.

  |notification-id| - The id of the notification to be cleared. This is returned by 'notifications.create' method.

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 [was-cleared] where:

  |was-cleared| - https://developer.chrome.com/extensions/notifications#property-callback-wasCleared.

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/notifications#method-clear.
sourceraw docstring

clear*cljs

(clear* config notification-id)
source

createclj/smacro

(create notification-id options)

Creates and displays a notification.

|notification-id| - Identifier of the notification. If not set or empty, an ID will automatically be generated. If it matches an existing notification, this method first clears that notification before proceeding with the create operation. The identifier may not be longer than 500 characters.The notificationId parameter is required before Chrome 42. |options| - Contents of the notification.

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 [notification-id] where:

|notification-id| - https://developer.chrome.com/extensions/notifications#property-callback-notificationId.

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/notifications#method-create.

Creates and displays a notification.

  |notification-id| - Identifier of the notification. If not set or empty, an ID will automatically be generated. If it
                      matches an existing notification, this method first clears that notification before proceeding with
                      the create operation. The identifier may not be longer than 500 characters.The notificationId
                      parameter is required before Chrome 42.
  |options| - Contents of the notification.

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 [notification-id] where:

  |notification-id| - https://developer.chrome.com/extensions/notifications#property-callback-notificationId.

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/notifications#method-create.
sourceraw docstring

create*cljs

(create* config notification-id options)
source

gen-callclj

source

gen-wrapclj/smacro

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

get-allclj/smacro

(get-all)

Retrieves all the notifications.

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 [notifications] where:

|notifications| - https://developer.chrome.com/extensions/notifications#property-callback-notifications.

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/notifications#method-getAll.

Retrieves all the notifications.

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 [notifications] where:

  |notifications| - https://developer.chrome.com/extensions/notifications#property-callback-notifications.

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/notifications#method-getAll.
sourceraw docstring

get-all*cljs

(get-all* config)
source

get-permission-levelclj/smacro

(get-permission-level)

Retrieves whether the user has enabled notifications from this app or extension.

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 [level] where:

|level| - https://developer.chrome.com/extensions/notifications#property-callback-level.

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/notifications#method-getPermissionLevel.

Retrieves whether the user has enabled notifications from this app or extension.

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 [level] where:

  |level| - https://developer.chrome.com/extensions/notifications#property-callback-level.

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/notifications#method-getPermissionLevel.
sourceraw docstring

get-permission-level*cljs

(get-permission-level* config)
source

on-button-clicked*cljs

(on-button-clicked* config channel & args)
source

on-clicked*cljs

(on-clicked* config channel & args)
source

on-closed*cljs

(on-closed* config channel & args)
source

on-permission-level-changed*cljs

(on-permission-level-changed* config channel & args)
source

on-show-settings*cljs

(on-show-settings* config channel & args)
source

tap-all-eventsclj/smacro

(tap-all-events chan)

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

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

tap-on-button-clicked-eventsclj/smacro

(tap-on-button-clicked-events channel & args)

The user pressed a button in the notification.

Events will be put on the |channel| with signature [::on-button-clicked [notification-id button-index]] where:

|notification-id| - https://developer.chrome.com/extensions/notifications#property-onButtonClicked-notificationId. |button-index| - https://developer.chrome.com/extensions/notifications#property-onButtonClicked-buttonIndex.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/notifications#event-onButtonClicked.

The user pressed a button in the notification.

Events will be put on the |channel| with signature [::on-button-clicked [notification-id button-index]] where:

  |notification-id| - https://developer.chrome.com/extensions/notifications#property-onButtonClicked-notificationId.
  |button-index| - https://developer.chrome.com/extensions/notifications#property-onButtonClicked-buttonIndex.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/notifications#event-onButtonClicked.
sourceraw docstring

tap-on-clicked-eventsclj/smacro

(tap-on-clicked-events channel & args)

The user clicked in a non-button area of the notification.

Events will be put on the |channel| with signature [::on-clicked [notification-id]] where:

|notification-id| - https://developer.chrome.com/extensions/notifications#property-onClicked-notificationId.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/notifications#event-onClicked.

The user clicked in a non-button area of the notification.

Events will be put on the |channel| with signature [::on-clicked [notification-id]] where:

  |notification-id| - https://developer.chrome.com/extensions/notifications#property-onClicked-notificationId.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/notifications#event-onClicked.
sourceraw docstring

tap-on-closed-eventsclj/smacro

(tap-on-closed-events channel & args)

The notification closed, either by the system or by user action.

Events will be put on the |channel| with signature [::on-closed [notification-id by-user]] where:

|notification-id| - https://developer.chrome.com/extensions/notifications#property-onClosed-notificationId. |by-user| - https://developer.chrome.com/extensions/notifications#property-onClosed-byUser.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/notifications#event-onClosed.

The notification closed, either by the system or by user action.

Events will be put on the |channel| with signature [::on-closed [notification-id by-user]] where:

  |notification-id| - https://developer.chrome.com/extensions/notifications#property-onClosed-notificationId.
  |by-user| - https://developer.chrome.com/extensions/notifications#property-onClosed-byUser.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/notifications#event-onClosed.
sourceraw docstring

tap-on-permission-level-changed-eventsclj/smacro

(tap-on-permission-level-changed-events channel & args)

The user changes the permission level. As of Chrome 47, only ChromeOS has UI that dispatches this event.

Events will be put on the |channel| with signature [::on-permission-level-changed [level]] where:

|level| - https://developer.chrome.com/extensions/notifications#property-onPermissionLevelChanged-level.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/notifications#event-onPermissionLevelChanged.

The user changes the permission level.  As of Chrome 47, only ChromeOS has UI that dispatches this event.

Events will be put on the |channel| with signature [::on-permission-level-changed [level]] where:

  |level| - https://developer.chrome.com/extensions/notifications#property-onPermissionLevelChanged-level.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/notifications#event-onPermissionLevelChanged.
sourceraw docstring

tap-on-show-settings-eventsclj/smacro

(tap-on-show-settings-events channel & args)

The user clicked on a link for the app's notification settings. As of Chrome 47, only ChromeOS has UI that dispatches this event. As of Chrome 65, that UI has been removed from ChromeOS, too.

Events will be put on the |channel| with signature [::on-show-settings []].

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/notifications#event-onShowSettings.

The user clicked on a link for the app's notification settings.  As of Chrome 47, only ChromeOS has UI that dispatches this
event. As of Chrome 65, that UI has been removed from ChromeOS, too.

Events will be put on the |channel| with signature [::on-show-settings []].

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/notifications#event-onShowSettings.
sourceraw docstring

updateclj/smacro

(update notification-id options)

Updates an existing notification.

|notification-id| - The id of the notification to be updated. This is returned by 'notifications.create' method. |options| - Contents of the notification to update to.

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 [was-updated] where:

|was-updated| - https://developer.chrome.com/extensions/notifications#property-callback-wasUpdated.

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/notifications#method-update.

Updates an existing notification.

  |notification-id| - The id of the notification to be updated. This is returned by 'notifications.create' method.
  |options| - Contents of the notification to update to.

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 [was-updated] where:

  |was-updated| - https://developer.chrome.com/extensions/notifications#property-callback-wasUpdated.

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/notifications#method-update.
sourceraw docstring

update*cljs

(update* config notification-id options)
source

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

× close