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 36 * https://developer.chrome.com/apps/notifications
(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/apps/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/apps/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/apps/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/apps/notifications#method-clear.
(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/apps/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/apps/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/apps/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/apps/notifications#method-create.
(get-all)
Retrieves all the notifications of 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 [notifications] where:
|notifications| - https://developer.chrome.com/apps/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/apps/notifications#method-getAll.
Retrieves all the notifications of 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 [notifications] where: |notifications| - https://developer.chrome.com/apps/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/apps/notifications#method-getAll.
(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/apps/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/apps/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/apps/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/apps/notifications#method-getPermissionLevel.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.app.notifications namespace.
Taps all valid non-deprecated events in chromex.app.notifications namespace.
(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/apps/notifications#property-onButtonClicked-notificationId. |button-index| - https://developer.chrome.com/apps/notifications#property-onButtonClicked-buttonIndex.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/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/apps/notifications#property-onButtonClicked-notificationId. |button-index| - https://developer.chrome.com/apps/notifications#property-onButtonClicked-buttonIndex. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/notifications#event-onButtonClicked.
(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/apps/notifications#property-onClicked-notificationId.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/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/apps/notifications#property-onClicked-notificationId. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/notifications#event-onClicked.
(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/apps/notifications#property-onClosed-notificationId. |by-user| - https://developer.chrome.com/apps/notifications#property-onClosed-byUser.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/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/apps/notifications#property-onClosed-notificationId. |by-user| - https://developer.chrome.com/apps/notifications#property-onClosed-byUser. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/notifications#event-onClosed.
(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/apps/notifications#property-onPermissionLevelChanged-level.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/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/apps/notifications#property-onPermissionLevelChanged-level. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/notifications#event-onPermissionLevelChanged.
(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/apps/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/apps/notifications#event-onShowSettings.
(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/apps/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/apps/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/apps/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/apps/notifications#method-update.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close