title: Can I transfer data between elements with a JavaScript event?
body: <p>I’m building a widget system for the web/app creation tool <a href="https://www.weld.io" rel="nofollow">Weld</a>, and I would like to be able to transfer data between elements on the DOM.</p>
  
  <p>Ideally something like:</p>
  
  <pre><code>var myObject = { name: 'Bob', age: 35 };
  
  // Send change event with data
  $('#myElement').trigger('change', myObject);
  
  // Listen to change event and receive data
  $('#myElement').change(function (event, myObject) {
      console.log('#myElement received', myObject);
  });
  </code></pre>
  
  <p>Is something like this possible?</p>
  
  <p>To clarify, the event trigger/receive works but can I somehow transfer <code>myObject</code> with the event?</p>