packages/js-toolkit/abstracts/EventManager.js
/**
   * Bind a listener function to an event for one execution only.
   *
   * @param  {String}       event    Name of the event.
   * @param  {Function}     listener Function to be called.
   * @return {EventManager}          The current instance.
   */
Bind a listener function to an event for one execution only.
@param  {String}       event    Name of the event.
@param  {Function}     listener Function to be called.
@return {EventManager}          The current instance.
Bind a listener function to an event for one execution only . @param { String } event Name of the event . @param { Function } listener Function to be called . @return { EventManager } The current instance .
$once(event, listener) {
    const instance = this;
    this.$on(
      event,
      function handler(...args) {
        instance.$off(event, handler);
        listener.apply(instance, args);
      }
    );
    return this;
  }
$once ( event , listener ) { const instance = this ; this . $on ( event , function handler ( ... args ) { instance . $off ( event , handler ) ; listener . apply ( instance , args ) ; } ) ; return this ; }
Bind a listener function to an event for one execution only.
Bind a listener function to an event for one execution only .
/**
       * @param {...any} args
       */