KangoMessageSource

Summary

Name Description
dispatchMessage Dispatches a message

Methods

dispatchMessage

KangoMessageSource.dispatchMessage(name, data)

Dispatches a message to the message event source.

Arguments:
  • name (string) – message name
  • data (variant) – JSON serializable data to send

Example:

kango.addMessageListener('GetInfo', function(event) {
        // send answer to message source
        event.source.dispatchMessage('SetInfo', {x:2, y:8});
});