Emits an event. Note events are always fired async.
the channel object.
event name
the event arguments
// object as event channelconst channel = {};// connect to event "changed"on(channel, "changed", (msg)=> console.log(msg));// fire changed eventemit(channel, "changed", "my event msg"); Copy
// object as event channelconst channel = {};// connect to event "changed"on(channel, "changed", (msg)=> console.log(msg));// fire changed eventemit(channel, "changed", "my event msg");
Emits an event. Note events are always fired async.