Namespace: notification

webOS. notification

Methods

(static) removeToast(toastId)

Removes a toast notification
Parameters:
Name Type Description
toastId string ID of the toast to remove
Source:

(static) showDashboard(urlopt, htmlopt) → {object}

Creates a dashboard window. (Only works on old webOS and Open webOS)
Parameters:
Name Type Attributes Description
url string <optional>
URL for an HTML file to be loaded into the dashboard.
html string <optional>
HTML code to inject into the dashboard window.
Source:
Returns:
Window object of the child window for the dashboard
Type
object

(static) showToast(params, callbackopt)

Shows a temporary toast message via the system
Parameters:
Name Type Attributes Description
params object Toast notification parameters, including:
Properties
Name Type Attributes Description
message string Message to display (upto 60 characters)
icon string <optional>
Icon url for the notification (80x80 png format)
appId string <optional>
AppID of app to launch when toast is clicked. Only needed to specific a different appID than current app.
appParams object <optional>
Launch parameters to send when clicked.
target string <optional>
A target filepath to open; must be a valid webOS mimetype. An alternative to appId and params.
noaction boolean <optional>
If clicking the toast should do nothing.
stale boolean <optional>
If true, it's not actively displayed as a new notification.
callback webOS.notification~toastCallback <optional>
The function to call once the toast notification is initialized.
Source:

(static) supportsDashboard() → {boolean}

Checks whether or not the current device supports creation of dashboard windows.
Source:
Returns:
- Whether or not dashboard windows are supported.
Type
boolean

Type Definitions

toastCallback(toastId)

Parameters:
Name Type Description
toastId string Unique ID of the toast being shown
Source: