title: HTML5 Canvas Mouse coordinates
body: <p>I have an HTML file with a <code>&lt;canvas&gt;</code> element and I am trying to get the mouse coordinates in the <code>click</code> event. I am using this code:</p>
  
  <pre><code>secondCanvas.addEventListener('click', function(e) {
      console.log(e.pageX)
  }, false);
  </code></pre>
  
  <p>When I click on the top left point I get in console 500~ number, not zero... what do I need to do to get the coordinates of the mouse on the canvas?</p>