title: in javascript, how do you determine the current event if not passed as arg?
body: <p>In an arbitrary javascript function, wish to determine the upstream event.</p>
  
  <p>The event listener function did not pass the event do the current function.  afaik, <code>window.event</code> is <em>not</em> WC3 and not available. </p>
  
  <pre>
  function listener(e) { subfunc(e.target); }
  
  function subfunc( element) {
      // here I wish to know which if any event responsible for me being called
      var event = ?;
      switch( event.type ) { ... }
  }
  </pre>
  
  <p>How does function <code>subfunc()</code> determine the current event?</p>
  
  <p>(Apologize if question asked before - seems it must have been - but cannot track it down.)</p>