title: Having a dispatchEvent triggered on an object how can I find out how to listen to it and where the event is dispatched?
body: <p>I have some code build by someone else and I am trying to alter some form values when an event is dispatched</p>
  
  <p>Here is the line of code</p>
  
  <pre><code>_instance.dispatchEvent ( "ADD_ROW",  { 'container' : $li, 'value' : data } );
  </code></pre>
  
  <p>What I can't seem to do on a global level is do something like this</p>
  
  <pre><code>someGlobalVariable.addEventListener('ADD_ROW', function (e) { console.log(11111); }, false);
  </code></pre>
  
  <p>or</p>
  
  <pre><code>document.querySelector('body #an_id').addEventListeneraddEventListener('ADD_ROW', function (e) { console.log(11111); }, false);
  </code></pre>
  
  <p>I don't know where the ADD_ROW is added or what global object I have to look at. </p>
  
  <p>_instance looks like this on console.log</p>
  
  <pre><code>Object { _listenerMap: Object, indexOfListener: AbstractEventDispatcher/instance.indexOfListener(), addEventListener: AbstractEventDispatcher/instance.addEventListener(), removeEventListener: AbstractEventDispatcher/instance.removeEventListener(), hasEventListener: AbstractEventDispatcher/instance.hasEventListener(), dispatchEvent: AbstractEventDispatcher/instance.dispatchEvent(), release: AbstractEventDispatcher/instance.release(), rowCount: JSONFieldSetList/_instance.rowCount(), addRow: JSONFieldSetList/_instance.addRow(), deleteRow: JSONFieldSetList/_instance.deleteRow(), 4 more… }
  </code></pre>
  
  <p>Is there a way I can track what is happening and where the event is dispatched?</p>