Hi, I need help.
arixer
1

Hi arixer,

Well we have implemented a event listener as a call back for receiving the payload for a particular topic, anywhere in the scope of your JavaScript code.

Lets say you have subscribed to a topic called “test”

In order to read the payload coming in the topic “test” here is the sample code

document.addEventListener(“test”,function(event){

console.log(event.topic,event.payload)

});

So basically you can read the payload in following way

document.addEventListener(<name_of_topic_you_have_subscribed>,

function(event){

console.log(event.topic,event.payload)

});

Feel free to reach us in case of any other questions.

Open Source Team

Arcoiris Labs

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.