Tutorial: fdc3.addIntentListener

fdc3.addIntentListener

Adds an intent handler for incoming Intents. If there are pending Intents when the listener is added, only the last Intent raised will be received.

Example

const contextHandler = (context) => {
    myViewChartListener(context);
};

const listener = fdc3.addIntentListener('ViewChart', contextHandler);

function myAppCloseSequence() {
    // to unsubscribe the handler, simply call:
    listener.unsubscribe();
}