EventListener.addEventListener

Adds an event through a delegate.

  1. size_t addEventListener(void delegate(T) listener)
    class EventListener(O : Event, Children...)
    @trusted
    size_t
    addEventListener
    (
    T
    )
    (
    void delegate
    (
    T
    )
    listener
    )
    if (
    is(T == class) &&
    is(T : O)
    ||
    is(T == interface)
    )
    if (
    areValidChildren!(O, Children)
    )
  2. opOpAssign(void delegate(T) listener)

Return Value

Type: size_t

an id that can be used to unregister the event

Meta