title: why does "currentTarget.onclick" have a null value even though there is an onclick handler and it works
body: <p>I have set a click handler on button1, when the click handler is called it prints the id of the button and the value of "onclick" based on e.currentTarget. The callback is called corrrectly, the id is correct, BUT the "onclick" value has a value of "undefined" not something that represents the function that is called in practice (actually the value is "null" when I check in the chrome debugger). 
  My question is 
  1) Why is e.currentTarget.onclick null ?
  2) Where can I see if an onclick function is defined and wht it's value is ?
  Thanks</p>
  
  <pre><code>&lt;body&gt;
       &lt;div id="top1"&gt;&lt;button id="but1"&gt; button 1&lt;/button&gt;&lt;/div&gt;
  &lt;/body&gt;
  
  
  function call_cb_click(text) {
      return function foo(e) {
          console.log("in callback for "+ text + "cb is " + e.currentTarget.onClick);
      }
  }
  function test() {
      $("#but1").on('click',call_cb_click("button 1 "));  
  }
  $(document).ready(test);
  </code></pre>