addPluginEventHandler method

void addPluginEventHandler(
  1. MessageType type,
  2. Function handler
)

Add a handler for a special message type If the message type has been handled by one handler, the old handler will be overwrided by the new one

Implementation

void addPluginEventHandler(MessageType type, Function handler) {
  messageHandler[type] = handler;
}