javascript - How to get a Touch object from a TouchEvent -


looking @ mozilla's reference touchevent, see no obvious way (one) touch object caused event. maybe because i'm misunderstanding how these things work. if following true, make sense me:

  • if multiple touch events of same type happen, event handler called once , programmer expected handle multiple events using touchevent.changedtouches
  • touch events of different types call 2 different handlers separately (eg. if touchstart happens @ same time touchend)

is guess correct? if so, answer main question loop through changedtouches , handle each separately (unless have special logic).

the 'touchstart' event fired list of changedtouches, can 1 or many. guess correct, have loop through changedtouches , treat them separately. take @ portion of documentation provide examples:

https://developer.mozilla.org/en-us/docs/web/guide/dom/events/touch_events#tracking_new_touches


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -