Touch.identifier

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The Touch.identifier returns a value uniquely identifying this point of contact with the touch surface. This value remains consistent for every event involving this finger's (or stylus's) movement on the surface until it is lifted off the surface.

Syntax

touchItem.identifier;

Return value

A long that represents the unique ID of the Touch object.

Example

someElement.addEventListener('touchmove', function(e) { 
// Iterate through the list of touch points that changed 
// since the last event and print each touch point's identifier. 
  for (var i=0; i < e.changedTouches.length; i++) { 
    console.log("changedTouches[" + i + "].identifier = " + e.changedTouches[i].identifier); 
  } 
}, false);

Specifications

Specification Status Comment
Touch Events – Level 2 Draft No change.
Touch Events Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support 22Edge Full support YesFirefox Full support 52
Notes
Full support 52
Notes
Notes Touch events support has been fixed and reenabled in Windows desktop platforms.
No support 18 — 24
Notes
Notes Web compatibility issues seen in bug 888304.
IE No support NoOpera No support NoSafari No support NoWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 6Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.

Document Tags and Contributors

Last updated by: fscholz,