Function on

  • Add a listener for a given event.

    Type Parameters

    Parameters

    • eventName: E

      The event name.

    • listener: Events[E]

      The listener function.

    • Optionalcontext: any

      The context to invoke the listener with.

    Returns void

    me.event.on("event-name", myFunction, this);