title: Trigger all browser events using dispatchEvent
body: <p>I'm thinking about building a tool that converts all browser events (either native dom events like <code>.click()</code> or jQuery events) to a standard form. </p>
  
  <p>The standard form is: <code>HTMLElement.dispatchEvent(new Event(eventType, eventInitDict))</code></p>
  
  <p>For example, I want to change <code>HTMLElement.click()</code> to <code>HTMLElement.dispatchEvent(new Event("click", {"bubbles": true, ...}))</code> for all events.</p>
  
  <p><strong>My question:</strong></p>
  
  <ol>
  <li>Is there a complete mapping from events to this standard form and if
  so, is it documented anywhere?</li>
  <li>Are there any events that could be fired that couldn't be converted
  to this standard form?</li>
  <li>Does jQuery do anything fancy where I wouldn't be able to do this
  conversion.</li>
  </ol>
  
  <p>It is imperative that I completely convert all events into this format... None can be spared!</p>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p><strong>Why am I trying to do this?</strong></p>
  
  <p>I am trying to capture all events fired by a Chrome extension. To do this, I've decided to modify an extensions content script before it is injected into the page (I don't care about background page or popup pages) so all events triggered are "tagged" as originating from an extension (this will be added to the <code>eventInitDict</code> in the examples above. I'm modifying Chromium to do this.</p>
  
  <hr>
  
  <p>PS. I couldn't think of a better question title but if you have one, please let me know / change it.</p>