Widget core events

These are the events that are the same for all the Apps

Event name

Description

closed

Occurs after your customer closes the widget.

exitIntent

Occurs after your customer has initiated closing operation, but hasn't closed the widget yet.

failure

Occurs after any technical failure of the widget or App within the widget.

Fires on any event. Mainly for debugging purposes.

Listening for command output

Listening to command outputs is the easiest way of getting to know about all the important events. Every App, no matter if backend or frontend will finish its flow with a command.

// open the veriff app in the widget
_t10l.navigateToApp('veriff')

// listen on the command success
_t10l.on('commandSucceded', (command) => {
    if (command.appName === 'veriff' && command.commandType === 'VERIFF_VERIFICATION') {
        // data downloaded veriff will now be available in the REST API
    }
})
// let's say we triggered rejestr.io via REST API in the background
_t10l.on('commandSucceded', (command) => {
    if (command.appName === 'rejestr-io' && command.commandType === 'FETCH_PARTY_BY_NIP') {
        // data downloaded by rejestr-io will now be available in the REST API
    }
})

App specific events

Each App has its own set of events. Check the documentation of the App you want to use to find the list of all its events.