Miscellaneous
Using Event Listeners
ToDesktop Event Listeners allow you to subscribe to events from the underlying desktop instance.
Subscribing to namespace events
This approach will soon be deprecated. Use the API under the next section, Subscribing to custom events, with newer versions of ToDesktop Builder.
ToDesktop APIs expose an on
function for interacting with desktop events. For example, we can use the appMenu
namespace to listen to custom menu events:
Subscribing to custom events
This functionality was introduced in v0.18.0
of ToDesktop Builder.
Events that are specified through ToDesktop Builder can be subscribed to via the object
namespace. For example, we can specify an event called context-tray-clicked
that triggers whenever a specific tray has been clicked.
Subscribing to instance events
ToDesktop also supports listening to instance events from created objects. For example, we can listen to notification
events from a specific notification: