lib/gcli/util/util.js
function(ev) {
    if (fireHoldCount > 0) {
      heldEvents.push(ev);
      if (eventDebug) {
        console.log('Held fire: ' + name, ev);
      }
      return;
    }

    if (eventDebug) {
      console.group('Fire: ' + name + ' to ' + handlers.length + ' listeners', ev);
    }

    // Use for rather than forEach because it step debugs better, which is
    // important for debugging events
    for (var i = 0; i < handlers.length; i++) {
      var handler = handlers[i];
      if (eventDebug) {
        console.log(nameFunction(handler));
      }
      handler.func.call(handler.scope, ev);
    }

    if (eventDebug) {
      console.groupEnd();
    }
  }
function(ev) {
    if (fireHoldCount > 0) {
      heldEvents.push(ev);
      if (eventDebug) {
        console.log('Held fire: ' + name, ev);
      }
      return;
    }

    if (eventDebug) {
      console.group('Fire: ' + name + ' to ' + handlers.length + ' listeners', ev);
    }

    // Use for rather than forEach because it step debugs better, which is
    // important for debugging events
    for (var i = 0; i < handlers.length; i++) {
      var handler = handlers[i];
      if (eventDebug) {
        console.log(nameFunction(handler));
      }
      handler.func.call(handler.scope, ev);
    }

    if (eventDebug) {
      console.groupEnd();
    }
  }
function ( ev ) { if ( fireHoldCount > 0 ) { heldEvents . push ( ev ) ; if ( eventDebug ) { console . log ( 'Held fire: ' + name , ev ) ; } return ; } if ( eventDebug ) { console . group ( 'Fire: ' + name + ' to ' + handlers . length + ' listeners' , ev ) ; } // Use for rather than forEach because it step debugs better, which is // important for debugging events for ( var i = 0 ; i < handlers . length ; i ++ ) { var handler = handlers [ i ] ; if ( eventDebug ) { console . log ( nameFunction ( handler ) ) ; } handler . func . call ( handler . scope , ev ) ; } if ( eventDebug ) { console . groupEnd ( ) ; } }
This is how the event is triggered.
@param ev The event object to be passed to the event listeners
This is how the event is triggered .