Updated API Event (markdown)

Florian Nücke 2014-03-05 12:38:54 -08:00
parent 4b10126153
commit ac29a2470a

@ -2,6 +2,7 @@ This API provides a rudimentary event system. It is primarily intended to be use
- `event.listen(name: string, callback: function): boolean`
Register a new event listener that should be called for events with the specified name. When registering for signal events, this is the name of the signal. Returns `true` if the listener was successfully registered, `false` if it already was registered for this event type.
Note that event listeners may return `false` to unregister themselves (equivalent to calling `event.ignore` and passing the listener with the event name it was registered for).
- `event.ignore(name: string, callback: function): boolean`
Unregister a previously registered event listener. Returns `true` if the event listener was removed, `false` if the listener was not registered.
- `event.timer(interval: number, callback: function[, times: number]): number`