Class finesse.containerservices.FinesseToaster
FinesseToaster is a utility class to show toaster notification in Finesse. FinesseToaster leverages HTML5 Notification API to display Toaster Notification.
For HTML5 Notification API and browser compatibility, please click here.
Defined in: finesse.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
TOASTER_DEFAULT_ICONS constants has list of predefined icons (e.g INCOMING_CALL_ICON).
|
Method Attributes | Method Name and Description |
---|---|
init(Could)
initialize FininseToaster and inject dependencies.
|
|
showToaster(title, options)
showToaster : shows Toaster Notification.
|
Field Detail
TOASTER_DEFAULT_ICONS
TOASTER_DEFAULT_ICONS constants has list of predefined icons (e.g INCOMING_CALL_ICON).
Constant list
- TOASTER_DEFAULT_ICONS.INCOMING_CALL_ICON
Method Detail
init(Could)
initialize FininseToaster and inject dependencies. this method
will also request permission in browser from user to display
Toaster Notification.
- Parameters:
- {Object} Could
- be finesse.container.Config or finesse.gadget.Config based on where it is getting initialized from.
- {Object} finesse.cslogger.ClientLogger
- Returns:
- finesse.containerservices.FinesseToaster
showToaster(title, options)
showToaster : shows Toaster Notification.
- Parameters:
- {String} title
- : title string should be displayed in the Toaster
- {Object} options
- is JSON object for notification options.
- options = {
- body : The body string of the notification as specified in the options parameter of the constructor.
- icon: The URL of the image used as an icon of the notification as specified in the options parameter of the constructor.
- autoClose : custom auto close time of the toaster
- showWhenVisible : 'true' toaster shows up even when page is visible,'false' toaster shows up only when page is invisible
- }