Event Firers
Event firers
The Fluid event system is operated by instances of an "event firer" which are created by a call to fluid.event.getEventFirer()
:
var myFirer = fluid.event.getEventFirer(unicast, preventable);
Argument |
Type |
Description |
---|---|---|
|
|
If |
|
|
If |
Using an event firer
Once an event firer is constructed, it can be called with the following methods:
Method |
Arguments |
Description |
---|---|---|
|
|
Registers the supplied listener with this firer. The listener is a function of a particular signature which is determined between the firer and listener of an event. The namespace parameter is an optional String which defines a key representing a particular "function" of the listener. At most one listener may be registered with a firer with a particular key. This is a similar system to that operated by the JQuery namespaced events system. For an event firer which is of type |
|
|
Supplies either the same listener object which was previously supplied to |
|
(arbitrary) |
Fires an event to all the registered listeners. They will each be invoked with the exact argument list which is supplied to |