As I am working on a legacy extension in Addon SDK, can I send more than one variable in one emit message. All examples are based on one variable. If I want to pass more than one variable in one emit message, is this possible? what is the syntax?
var myMessagePayload = "some data";
self.port.emit("myMessage", myMessagePayload);
Is this the right syntax? => ??
Because what I do is:
var myMessagePayload = "some data";
panel.port.emit("myMessage", myMessagePayload);
Then:
panel.port.on("myMessage", function handleMyMessage(myMessagePayload) {
// Handle the message
});
If I have: myMessagePayload1 and myMessagePayload2. What is the right syntax to send and receive them because all the examples in the documentations show one variable. In SDK please.