JavaScript API
Once the widget is initialized, window.SupportDesk exposes the following methods:
| Method | Description |
|---|---|
init(config) | Initializes the widget with the given config. |
destroy() | Unmounts the widget completely. |
open() | Opens the panel. |
close() | Closes the panel. |
toggle() | Toggles open/closed. |
isOpen() | Returns true if open. |
onUnreadChange(cb) | Subscribes to unread count changes. Returns an unsubscribe function. |