Capture Internal Events
Invox Dictation defines a set of events that are triggered at certain times — either to warn of an error during the session, or to signal that a process has been executed correctly. These events can be captured in order to define a behaviour.
Available events
| Event | Description |
|---|---|
INVOX.eventTypeReport.LOGIN_ERROR | Triggered when an error occurs during login. |
INVOX.eventTypeReport.LOGIN_SUCCESS | Triggered when the login is successful. |
INVOX.eventTypeReport.NOT_CUSTOMIZED_COMPONENTS | Triggered during login when customizable components have not been pre-specified via INVOX.CustomizeComponents(). |
Usage
document.addEventListener(INVOX.eventTypeReport.LOGIN_ERROR, (e) => {
console.error("Login error:", e.detail);
alert(e.detail);
});
document.addEventListener(INVOX.eventTypeReport.LOGIN_SUCCESS, (e) => {
const user = INVOX.GetUserInfo();
console.log(`Welcome, ${user.Name}!`);
});
document.addEventListener(INVOX.eventTypeReport.NOT_CUSTOMIZED_COMPONENTS, (e) => {
console.warn(e.detail);
});
The event object has a
detail field with information related to the occurrence of the event.Table of Contents