This demonstration creates a new event type named "newMessage" which is fired whenever a valid message is submitted. The event can be delegated to any number of subscribers.
For more information, refer to How to Create Custom Events in JavaScript.
Event information log =====================