code:system:notify
Differences
This shows you the differences between two versions of the page.
code:system:notify [2011/01/30 16:50] – created jmgr | code:system:notify [2011/04/20 20:29] (current) – removed jmgr | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Notify ====== | ||
- | This object allows sending system notifications. It only works on GNU/Linux. | ||
- | ===== Functions ===== | ||
- | |||
- | ==== Notify ==== | ||
- | Constructor function. | ||
- | |||
- | === Syntax === | ||
- | <code javascript> | ||
- | var myObject = new Notify(); | ||
- | </ | ||
- | <code javascript> | ||
- | var myObject = new Notify(parameters); | ||
- | </ | ||
- | |||
- | === Arguments === | ||
- | - parameters - (object) the message parameters | ||
- | * title - (string) the notification' | ||
- | * text - (string) the notification' | ||
- | * icon - (string) the notification' | ||
- | * timeout - (integer) the notification' | ||
- | |||
- | === Example === | ||
- | <code javascript> | ||
- | var myObject = new Notify(); | ||
- | </ | ||
- | <code javascript> | ||
- | var myObject = new Notify({ | ||
- | title: " | ||
- | text: "Hello automation world!" | ||
- | }); | ||
- | </ | ||
- | |||
- | ===== Methods ===== | ||
- | |||
- | ==== show ==== | ||
- | Shows the notification. | ||
- | |||
- | === Syntax === | ||
- | <code javascript> | ||
- | myObject.show(); | ||
- | </ | ||
- | <code javascript> | ||
- | myObject.show(parameters); | ||
- | </ | ||
- | |||
- | === Arguments === | ||
- | - parameters - (object) the message parameters | ||
- | * title - (string) the notification' | ||
- | * text - (string) the notification' | ||
- | * icon - (string) the notification' | ||
- | * timeout - (integer) the notification' | ||
- | |||
- | === Returns === | ||
- | * (Notify) this Notify | ||
- | |||
- | === Exceptions === | ||
- | * (NotificationError) unable to show the notification | ||
- | |||
- | === Example === | ||
- | <code javascript> | ||
- | myObject.show(); | ||
- | </ | ||
- | <code javascript> | ||
- | myObject.show({ | ||
- | title: " | ||
- | text: "Hello automation world!" | ||
- | }); | ||
- | </ | ||
- | |||
- | === Notes === | ||
- | If you want to update a notification' |
code/system/notify.1296406252.txt.gz · Last modified: 2021/02/13 11:23 (external edit)