User Tools

Site Tools


en:code:system:notify

Table of Contents

Notify

This object allows sending system notifications. It only works on GNU/Linux.

Functions

Notify

Constructor function.

Syntax

var myObject = new Notify();
var myObject = new Notify(parameters);

Arguments

  1. parameters - (object) the message parameters

Example

var myObject = new Notify();
var myObject = new Notify({
	title: "Hello",
	text: "Hello automation world!"
});

Methods

show

Shows the notification.

Syntax

myObject.show();
myObject.show(parameters);

Arguments

  1. parameters - (object) the message parameters

Returns

  • (Notify) this Notify

Exceptions

  • (NotificationError) unable to show the notification

Example

myObject.show();
myObject.show({
	title: "Hello",
	text: "Hello automation world!"
});

Notes

If you want to update a notification's text re-use a single Notify object and call show to change the text.

en/code/system/notify.txt · Last modified: 2016/10/09 11:10 (external edit)