Events subscription

Optional events to subscribe on

Register for events and handle them

Item Clicked

Emitted hen a user clicks on an item either on pieces tab or inside the chat

wishiSDK.on('item-clicked', function (itemId) {
    console.log(`[item-clicked] on event emitter, itemId);
});

An error has happened

wishiSDK.on('error', function(error) {
    console.error(`on event emitter, JSON.stringify(error));
});

Last updated