Skip to main content

Launcher.addListener()

The ZohoSalesIQ.Launcher.addListener allows you to register a callback that will be invoked whenever an event regarding the launcher is triggered.

EventInvoked when
HANDLE_CUSTOM_LAUNCHER_VISIBILITYShow/hide your custom launcher with the triggered boolean value.

Example

Copiedconst { Event } = ZohoSalesIQ.Launcher
    ZohoSalesIQ.Launcher.addListener(payload => {
      const {event, body} = payload;
      switch (event) {
        case Event
          .HANDLE_CUSTOM_LAUNCHER_VISIBILITY:
          // body.visible: boolean;
          console.log(body.visible, 'EVENT_HANDLE_CUSTOM_LAUNCHER_VISIBILITY');
          break;

        default:
          break;
      }
    });