B2G/gecko/browser/devtools/styleeditor/StyleEditorChrome.jsm
/**
   * Trigger named handlers in StyleEditorChrome listeners.
   *
   * @param string aName
   *        Name of the event to trigger.
   * @param Array aArgs
   *        Optional array of arguments to pass to the listener(s).
   * @see addActionListener
   */
Trigger named handlers in StyleEditorChrome listeners.
@param string aName
Name of the event to trigger.
@param Array aArgs
Optional array of arguments to pass to the listener(s).
Trigger named handlers in StyleEditorChrome listeners . @param string aName Name of the event to trigger . @param Array aArgs Optional array of arguments to pass to the listener ( s ) .
function SE__triggerChromeListeners(aName, aArgs)
  {
    if (!aArgs) {
      aArgs = [this];
    } else {
      aArgs.unshift(this);
    }
    let listeners = this._listeners.concat();
    for (let i = 0; i < listeners.length; i++) {
      let listener = listeners[i];
      let handler = listener["on" + aName];
      if (handler) {
        handler.apply(listener, aArgs);
      }
    }
  }
function SE__triggerChromeListeners ( aName , aArgs ) { if ( ! aArgs ) { aArgs = [ this ] ; } else { aArgs . unshift ( this ) ; } let listeners = this . _listeners . concat ( ) ; for ( let i = 0 ; i < listeners . length ; i ++ ) { let listener = listeners [ i ] ; let handler = listener [ "on" + aName ] ; if ( handler ) { handler . apply ( listener , aArgs ) ; } } }
Trigger named handlers in StyleEditorChrome listeners.
Trigger named handlers in StyleEditorChrome listeners .
// insert the origin Chrome instance as first argument // copy the list of listeners to allow adding/removing listeners in handlers // trigger all listeners that have this named handler.