Skip to main content

Overview

onUserEvent is a callback you can register on a DromoUploader instance to receive real-time notifications when a user interacts with specific UI controls inside the importer. It gives your host application observability into what the user is doing — useful for analytics, audit logging, conditional UI reactions, or debugging.

Registration

The method accepts a single callback function. It can be registered at any point before the user triggers the relevant interaction.
Only one callback can be registered per instance. Calling onUserEvent a second time replaces the first.

Callback Signature

The callback receives one argument, an IUserEvent object:

Event Types

Currently one event type is emitted:

BUTTON_CLICK Payload

When eventType is "BUTTON_CLICK", the payload is:
step values

Button Name Reference

The full set of buttonName values, grouped by step:

Upload step

Header select step

Column match step

Select / value match step

Review step

Exit confirmation modal

Generic alert / modal actions

Error Handling

Errors thrown inside your onUserEvent callback are caught by Dromo and logged as a warning — they will not crash the importer or interrupt the user’s flow:

Example

Notes

  • The callback is fire-and-forget from Dromo’s perspective — the return value is ignored and the importer does not await it.
  • The callback is registered on the importer instance, so each importer instance can have its own independent onUserEvent handler.
  • The callback is not invoked in headless mode (server-side Lambda execution), only during interactive browser sessions.