InTandemMessageHandler
Overview
MessageHandler is a utility provided by the intandem-app-com package for managing communication and handling incoming messages. This includes processing messages and acknowledging receipt with optional success or failure details.
Installation
Ensure you have the intandem-app-com package installed:
npm i @vcita/intandem-app-comImporting and Initializing
To use the message handler:
import messageHandler from '@vcita/intandem-app-com';
await messageHandler.init(window.parent, window);Functions
| Function | Description |
|---|---|
| init | Initialize the message handler |
| addEventListener | Listen to incoming events from the platform |
| removeEventListener | Remove existing listeners |
| getAuth | Get an authorization token to use with JWKS |
| getUser | Get the basic details about the user (impersonation, locale, current domain...) |
| getState | Get the state of the current host (widget or page) |
| setState | Set the state of the current host (widget or page) |
| navigate | Navigate to a different page in the system |
| openModal | Open a system modal over the current page |
| destroy | Release any resources before exiting |
Updated about 1 month ago
