Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Eventos táctiles

 

No estándar

Experimental support for touch events is added in Gecko 2.0. These allow you to track the movement of the user's finger on a touch screen, monitoring the raw touch events generated by the system. Although touch events are based on — and work similarly to — mouse events, each event includes an identifier that allows you to track multiple fingers moving on the screen at the same time.

Event fields

Touch events are based upon mouse events, and thereby share all mouse event fields. They include one additional field.

streamId
A unique integer identifying the finger generating the event. When the MozTouchDown event is built, a unique value is assigned to that finger. Corresponding MozTouchMove and MozTouchUp events for that finger will have the same streamId value. This lets you track each finger's movements on the touch screen independently. The stream ID is unique until the MozTouchUp event occurs; after that, the value may be recycled for another series of events.

Types of touch events

MozTouchDown

Sent when the user beings a screen touch action.

MozTouchMove

Sent when the user moves his finger on the touch screen.

MozTouchUp

Sent when the user lifts his finger off the screen.

See also

Etiquetas y colaboradores del documento

Etiquetas: 
 Colaboradores en esta página: teoli, inma_610
 Última actualización por: teoli,