title: How to find out which JavaScript events fired?
body: <p>I have a select list:</p>
  
  <pre><code>&lt;select id="filter"&gt;
    &lt;option value="Open" selected="selected"&gt;Open&lt;/option&gt;
    &lt;option value="Closed"&gt;Closed&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>When I select <code>Closed</code> the page reloads. In this case it shows closed tickets (instead of opened). It works fine when I do it manually.</p>
  
  <p>The problem is that the page does not reload when I select <code>Closed</code> with <a href="http://watir.com/" rel="noreferrer">Watir</a>:</p>
  
  <pre><code>browser.select_list(:id =&gt; "filter").select "Closed"
  </code></pre>
  
  <p>That usually means that some JavaScript event is not fired. I can fire events with Watir:</p>
  
  <pre><code>browser.select_list(:id =&gt; "filter").fire_event "onclick"
  </code></pre>
  
  <p>but I need to know which event to fire.</p>
  
  <p>Is there a way to find out which events are defined for an element?</p>