title: touchstart and touchend events in ionic 3
body: <p>I'm looking for a separate event handler in Ionic 3 for starting and ending a touch on an HTML element on a mobile app.</p>
  
  <p>I found many related and solved questions, but none for Ionic 3, which currently only seems to support "tap, press, pan, swipe, rotate, and pinch" (<a href="https://ionicframework.com/docs/components/#gestures" rel="nofollow noreferrer">https://ionicframework.com/docs/components/#gestures</a>).
  And none of these seem to provide a "handler" at the start, but only at the end. I see that then they do give the data of the touch duration (deltaTime), but by that point it's no use for my purposes.</p>
  
  <p>For more context, what I want is to clear a related timeout in the exact moment when the screen is first touched on an element, and then see whether or not this touch on the same specific element ends within a certain time (e.g. 250 ms, so that it can be evaluated as a "tap").</p>
  
  <p>For example something like this:</p>
  
  <p>JS:</p>
  
  <pre><code>timeout_1 = setTimeout(function() {
      // do something if timeout_1 not cleared by touch start
  }, 4000);
  
  touched(event) {
      clearTimeout(timeout_1);
      touching_x = true
      timeout_2 = setTimeout(function() {
          touching_x = false
          // store event details and do other things if timeout_2 not cleared by touch end
      }, 250);
  }
  
  touch_ended(event) { 
      if (touching_x==true) {
          clearTimeout(timeout_2);    
          // store event details and do some other things
      }
  }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;button ion-button type="button" (button_touch_started) = "touched($event)" (button_touch_ended) = "touch_ended($event)"&gt;Touch button&lt;/button&gt;
  </code></pre>
  
  <p>High precision (down to ms) would be important especially for the touch start time.</p>
  
  <p>Any advice is appreciated.</p>