Constructor
new Notification(options, callbackopt, errorCallbackopt)
Creates a new Notification.
Must be invoked with the new
keyword.
(See notification.constructor tutorial for an example.)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
fin.desktop.Notification~options | Notification creation options. See options for more details. |
|
callback |
function |
<optional> |
called if the method succeeds. |
errorCallback |
function |
<optional> |
called if the method fails. The reason for failure is passed as an argument. |
- Tutorials:
- To Do:
-
- Make sure any edits to this Table of Contents are also made to docs home page (/docs-README.md)!!
Members
(inner) onShowSuccess :Object
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
httpResponseCode |
number |
Methods
(static) getCurrent() → {fin.desktop.Notification}
Gets an instance of the current notification. For use within a notification window to close the window or send a message back to its parent application.
- Tutorials:
Returns:
close(callbackopt)
Closes the notification.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
callback |
function |
<optional> |
called if the method succeeds. |
- Tutorials:
sendMessage(message, callbackopt)
Sends a message to the notification.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
message |
variable | The message to be sent to the notification. Can be either a primitive data type (string, number, or boolean) or composite data type (object, array) that is composed of other primitive or composite data types. |
|
callback |
function |
<optional> |
called if the method succeeds. |
- Tutorials:
sendMessageToApplication(message, callbackopt)
Sends a message from the notification to the application that created the notification. The message is handled by the notification's onMessage callback.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
message |
variable | The message to be sent to the application. Can be either a primitive data type (string, number, or boolean) or composite data type (object, array) that is composed of other primitive or composite data types. |
|
callback |
function |
<optional> |
called if the method succeeds. |
- Tutorials:
Type Definitions
onClick()
Invoked when the notification is clicked.
onClose()
Invoked when the notification is closed via close()
on the notification instance.
NOTE: this is not invoked when the notification is dismissed via a swipe. For the swipe dismissal callback
see onDismiss.
onDismiss()
Invoked when the notification is dismissed by swiping it off the screen to the right. NOTE: this is not fired on a programmatic close.
onMessage(message)
Invoked when the notification recieves a message sent via sendMessage()
on the notification instance.
Parameters:
Name | Type | Description |
---|---|---|
message |
any | The message sent to the notification via |
onShow(successObj)
Invoked when the notification is shown.
Parameters:
Name | Type | Description |
---|---|---|
successObj |
fin.desktop.Notification~onShowSuccess |
options
Notification creation options.
This is the options object required by the Notification
constructor.
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
ignoreMouseOver |
boolean | Force dismissal even if the mouse is hovering over the notification. |
message |
any | Any serializable JavaScript value. |
onClick |
fin.desktop.Notification~onClick | |
onClose |
fin.desktop.Notification~onClose | |
onDismiss |
fin.desktop.Notification~onDismiss | |
onError |
errorCallback | |
onMessage |
fin.desktop.Notification~onMessage | |
onShow |
fin.desktop.Notification~onShow | |
timeout |
number | string | The duration the notification is shown in milliseconds. |
url |
string | The URL for the notification. |