pointerType property
Returns whether the source of the event is touch, pen or mouse.
This property is read-only.
![]() |
Syntax
HRESULT get_pointerType( [out] long *ptr );
Property values
Type: long
Remarks
The following example uses IDOMMSPointerEvent::pointerType to check whether a pointer is primary from inside events other than IHTMLDocument8::onmspointerdown.
elm.addEventListener("MSPointerDown",handleDown,false); function handleDown(evt) { if(evt.pointerType == evt.MSPOINTER_TYPE_TOUCH) { // Do something for touch input only }else{ // Do something for non-touch input } }
See also
Show:
