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 34 * https://developer.chrome.com/extensions/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/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.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close