Triggered for every event emitted by WhatsApp Web's internal BackendEventBus.
The first argument is the event name (one of the BackendEvent constant values).
Some events carry additional arguments (e.g. set_socket_state passes the new state).
Example
WPP.on('conn.backend_event', (eventName, ...args) => { if (eventName === 'storage_initialization_error') { // Browser IndexedDB failed — clear profile and restart to recover } });
Triggered afted a success QR code scan