Namespace: Events

jMod. Events

Since:
  • 0.0.9

Methods

staticjMod.Events.addEvent(name, recordEvent)

F:/Projects/jMod/main/bin/jMod.full.js, line 3384
Add a new event to the event list. Listeners can be added via "jMod.EVENTNAME = function(e, args, ...){...}" OR "jMod.Events.addListener(EVENTNAME, function(e, args, ...){...}, true)"
Name Type Default Description
name string Name of the event
recordEvent boolean true optional (if true) When fired, the firing arguments are recorded. If a listener is later added to the event, it is immediately called with the previous firing arguments.

staticjMod.Events.addEvent(name, arguments)

F:/Projects/jMod/main/bin/jMod.full.js, line 3417
Fire an event by name
Name Type Description
name string Name of the event to be fired
arguments * optional repeatable Arguments used when triggering the callback functions.

staticjMod.Events.addListener(name, callback, fireRecorded)

F:/Projects/jMod/main/bin/jMod.full.js, line 3402
Add a listener for a specified event
Name Type Default Description
name string Name of the event to listen for
callback function Callback function.
fireRecorded boolean true optional If the event is a recording event, immediately trigger the callback with the arguments from the previous firing event.