Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

pointerId property

The unique identifier of the contact for a touch, mouse or pen.

This property is read-only.

Internet Explorer 10

 

Syntax

JavaScript
lID = object.pointerId

 

Property values

Type: Integer

The unique identifier of the contact for a touch, mouse or pen.

Remarks

This remains the same throughout the lifetime of the pointer. The pointerID is used to associate an MSGesture object with a contact on an element so the element can receive MSGestureEvents.

Note  This item described in this topic requires Windows 8.
 

Examples


//  Adds a pointer to the MSGesture object for the red square
function redListener(evt)
{
    if (evt.type == "pointerdown")
    {
        redGesture.addPointer(evt.pointerId);
        return;
    }
    printEvent(evt);
}


See also

PointerEvent

 

 

Show:
© 2017 Microsoft