Skip to content

EventEmitter Class Reference

devongovett edited this page Nov 12, 2012 · 2 revisions

The AV.EventEmitter class enables event subscription and emitting for subclasses. The AV.EventEmitter class itself does nothing - you must subclass it or use one of its subclasses found in Aurora.

Methods

Methods

AV.EventEmitter#on(event, fn)

Subscribes the given function to the specified event.

AV.EventEmitter#off(event, fn)

Unsubscribes the given function from the specified event.

AV.EventEmitter#once(event, fn)

Subscribes the given function to the specified event. The function is only invoked the next time the event is fired, after which it is removed.

AV.EventEmitter#emit(event, args...)

Invokes each of the functions subscribed to the specified event, passing the specified arguments.