title: Uncaught TypeError: Cannot read property 'pageX' of undefined
body: <p>I am tinkering with <code>touchevents</code> in js. I have encountered this error in my logcat in eclipse.</p>
  
  <pre><code>document.getElementById("squareBracket").
      addEventListener("touchmove", touchHandler, false);
  document.getElementById("squareBracket").
      addEventListener("touchend", touchHandler, false);
  
  function touchHandler(e) {
   if (e.type == "touchstart") {
   alert("You touched the screen!");
    } else if (e.type == "touchmove") {
   // alert(e.changedTouches[0].pageX);
   // alert(e.changedTouches[0].pageY);
   } else if (e.type == "touchend" || e.type == "touchcancel") {
    alert('X :' + e.targetTouches[0].pageX); 
    alert('Y :' + e.targetTouches[0].pageY);
  }
  }
  </code></pre>
  
  <p>If I remove the comment in the <code>if</code> in <code>touchmove</code>, the coordinates popup. However, if it is commented, the error in my logcat appears.</p>