Skip to main content

Listeners

Your plugin needs to listen for and respond to events fired by Temenos Explorer. These include the following default settings that the user can change from the main Temenos Explorer settings screen:

EventDescription
dateFormatThe date display format to use
languageThe language to use for translations
layoutThe layout direction, LTR or RTL
numericFormatThe number display format to use
roleThe current role of the logged in user

In the context of your plugin which is loaded by Temenos Explorer inside an iFrame, the window object only references the <iframe> element.

To listen for events from Temenos Explorer you must add your event listeners to the top object which references the top level browser window or tab.

Here is an example event listener that is added to the top object to detect the "language" event from Temenos Explorer:

// Add listener to detect language changes from Temenos Explorer
top.addEventListener("language", () => {
setupLanguage();
});