ConstAppend items to the given zone (default 'top').
Clear the given zone, or all zones if position is omitted.
Create the tray icon, preserving any previously configured click action.
Remove the icon, cancel pending clicks and reset the click action to event.
Get all user-defined menu items, flattened in zone order
(top -> playback -> bottom). Built-in items injected by
showPlaybackControls / showSystemItems are not included.
Resolve whether the tray icon currently exists.
Remove items with the given ids from all zones, submenus included. Resolves with the number removed.
Select the process-wide left-click action, even before creating the icon.
event preserves existing click notifications. toggleMainWindow handles each
gesture natively, including while the page is suspended, and emits neither
click nor double-click events. It preserves window placement and tray settings.
Every call cancels pending clicks; the latest successful caller wins.
Remove click handlers that issue window commands before enabling native mode;
events already queued in a page cannot be recalled. Panel mode is unsupported.
Hide to the tray instead of quitting when the window is closed.
Replace the items of the zone determined by config.customPosition
(default 'top'). The other two zones are left intact. Use
setMenuZones to replace every zone at once, and the incremental
helpers below for partial updates.
Replace the tray icon image; omit or pass null to fall back to the main icon.
Update a single menu item's checked / enabled state in place. The id
is searched across all zones and recursively into submenus. At least one
of checked / enabled must be supplied. This is a granular alternative
to setContextMenu, which performs a full-zone replace.
Providing checked (true or false) marks the item checkable so subsequent
getMenuItems() and the WebView overlay keep checkbox semantics even when
the value is false.
The native tray menu is rebuilt from stored data each time it is opened,
so the new state takes effect on the next open rather than mutating a
menu that is already showing. An id no row has fails with NOT_FOUND.
Replace the items of all three zones in one call; a zone left out is
cleared. The built-in items of showPlaybackControls and
showSystemItems are not stored in the zones and stay. When an item is
rejected or the resource limits are exceeded, nothing is stored,
config included.
Prefer this to clearMenuItems followed by appendMenuItems when the whole menu changes: a menu opened between those calls shows part of the update, and two such updates that interleave add their items twice. Of two calls sent back to back, the later one is what remains.
Hide to the tray instead of the taskbar when the window is minimized.
Update the hover tooltip (max 128 characters).
Show a balloon notification. icon is 'info' (default) / 'warning' / 'error'.
traynamespace - system tray icon bindings.See the taskbar-tray page of the API reference for the full contract.