Module: Notification

Notification represents a window on OpenFin Runtime which is shown briefly to the user on the bottom-right corner of the primary monitor. A notification is typically used to alert the user of some important event which requires his or her attention. Notifications are a child or your application that are controlled by the runtime.

Method Index

Synchronous

Asynchronous

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:
Type
fin.desktop.Notification

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: