B2G/gecko/browser/devtools/shared/EventEmitter.jsm
/**
   * Listen for the next time an event is fired.
   *
   * @param string aEvent
   *        The event name to which we're connecting.
   * @param function aListener
   *        Called when the event is fired.  Will be called at most one time.
   */
Listen for the next time an event is fired.
@param string aEvent
The event name to which we're connecting.
@param function aListener
Called when the event is fired.  Will be called at most one time.
Listen for the next time an event is fired . @param string aEvent The event name to which we ' re connecting . @param function aListener Called when the event is fired . Will be called at most one time .
function EventEmitter_once(aEvent, aListener) {
    let handler = function() {
      this.off(aEvent, handler);
      aListener();
    }.bind(this);
    this.on(aEvent, handler);
  }
function EventEmitter_once ( aEvent , aListener ) { let handler = function ( ) { this . off ( aEvent , handler ) ; aListener ( ) ; } . bind ( this ) ; this . on ( aEvent , handler ) ; }
Listen for the next time an event is fired.
Listen for the next time an event is fired .