Tray Tutorial

This tutorial demonstrates how to create and manage tray icons.

Example

Usage

You can spawn a tray entry using:

const entry = core.make('osjs/tray', {
  title: 'My Tray Icon',
  icon: 'icon.src',
  onclick: ev => console.log('clicked'),
  oncontextmenu: ev => console.log('contextmenu')
});

If you're using this in a application, you probably want to destroy it when the user quits the application:

proc.on('destroy', () => entry.destroy());

results matching ""

    No results matching ""