Function once

  • Add a one-time 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.once("event-name", myFunction, this);