EventHub.AddEventListeners

Will subscribe a number of callbacks to a given event type

Example

var eventHub = new EventHub(); var callbacks = { nameChanged1: function(nameArgs) { alert(nameArgs.name); }, nameChanged2: function(nameArgs) { alert("Another Method" + nameArgs.name); } } eventHub.AddEventListeners("name-changed", callbacks);

(Void) AddEventListeners(eventType(String) The event type to subscribe to , callbacks(Array) Array of callbacks to subscribe )

Param

  • eventType

    (String)

    The event type to subscribe to

  • callbacks

    (Array)

    Array of callbacks to subscribe