"hljs-keyword">new</span> hx.EventEmitter;

eventEmitter.on(<span class="hljs-string">'my-event'</span>, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">d</span>)</span>{ <span class="hljs-built_in">console</span>.log(d) });

<span class="hljs-comment">// this will result in the object {x: 0, y: 123} being logged to the console</span>
eventEmitter.emit(<span class="hljs-string">'my-event'</span>, {
  <span class="hljs-attr">x</span>: <span class="hljs-number"