title: How to get the mouse position relative to the window viewport in javascript?
body: <p><code>event.pageY</code> gets the mouse position relative to the entire document height (<code>document.documentElement.offsetHeight</code> I assume).</p>
  <p>But how do I get the mouse position relative to the current viewport, which is <code>document.documentElement.clientHeight</code>?</p>
  <p>For example, if the browser window size has a 720 pixel height, I scroll down 3 pages and keep the mouse in the middle of the window, the position should be &quot;360&quot;, not 1800 (720 x 3 - 720 / 2).</p>