onPanelEvent
Delivers panel events to the host application for handling.
Overview
The onPanelEvent method is called when a panel interaction or internal SDK event requires a response from the host. Each event has a type and payload so the host can act accordingly.
Method Signature
onPanelEvent(event: PanelEvent): void;
Event types
Important: The table below only list the public panel events, as many of them are client specific panel related.
| Event type | Event payload | Description |
|---|---|---|
general:error | { message: string; code: number; details: object; } | Fired when a general error has happened to notify the client |
Return Value
This method does not return a value.
Example
class Delegate implements IMaestroEventDelegate {
onPanelEvent(event: PanelEvent): void {
if (event.type === "general:error") {
console.log(event.payload);
}
}
}
Notes
- Check
event.typebefore accessingevent.payloadto ensure type safety.