title: Custom event with custom data in JS?
body: <p>I'm doing the isolated context message passing in a Chrome extension. This doesn't really matter but what matters is it won't work with basic <code>$(document).trigger()</code> and <code>$(document).on()</code> (already tried including jQuery on both sides and it won't work).</p>
  
  <p>So we're sticking with standard JS. Now in their example, they say to listen to a custom event:</p>
  
  <pre><code> document.addEventListener('POLL',function(event){ 
       chrome.extension.sendRequest({poll:true, at:(new Date().getTime())}); 
   });
  </code></pre>
  
  <p>And to fire that event as required:</p>
  
  <pre><code>var ce = document.createEvent('Event');
  ce.initEvent('POLL',true,true);
  document.dispatchEvent(ce);
  delete ce;
  </code></pre>
  
  <p>As you can see, <code>POLL</code> is my custom event. 
  Now, how do I stick some data to it?</p>
  
  <p>I've googled the whole Internet and found zilch, must be looking for the wrong keywords lol.</p>