title: Javascript custom event change callback argument
body: <p>I want to write a custom event and  print to console obj.name in its callback function</p>
  
  <p>But I get an error and need to get obj name as obj.detail.context.name</p>
  
  <p>How can I solve it and print using obj.name line code instead of obj.detail.context.name</p>
  
  <p>currently the strucure of obj in the callback is:</p>
  
  <pre><code>obj
  </code></pre>
  
  <p>CustomEvent 
      {
      isTrusted: false
      }
      bubbles: false
      cancelBubble: false
      cancelable: false
      currentTarget: WindowdefaultPrevented: false
      detail: Object
      eventPhase: 2isTrusted: falseisTrusted: falsepath: Array[1]returnValue: truesrcElement: Windowtarget: WindowtimeStamp: 1446215160435type: "eat:done"<strong>proto</strong>: CustomEvent</p>