Fantom

 

class

fwt::EventListeners

sys::Obj
  fwt::EventListeners

@js

EventListeners manages a list of event callback functions.

Slots

addSource

Void add(|Event| cb)

Add a listener callback function

fireSource

Void fire(Event? event)

Fire the event to all the listeners

isEmptySource

Bool isEmpty()

Return if size is zero.

listSource

|Event|[] list()

Get the list of registered callback functions.

removeSource

Void remove(|Event| cb)

Remove a listener callback function

sizeSource

Int size()

Return number of registered callback functions.