faketouches.js
function triggerPointerEvents(type, pointerType) {
        var self = this;
        var names = {
            start: 'MSPointerDown',
            move: 'MSPointerMove',
            end: 'MSPointerUp'
        };

        var touchList = this._createTouchList(this.touches);
        touchList.forEach(function(touch) {
            var event = document.createEvent('Event');
            event.initEvent(names[type], true, true);

            event.MSPOINTER_TYPE_MOUSE = FakeTouches.POINTER_TYPE_MOUSE;
            event.MSPOINTER_TYPE_TOUCH = FakeTouches.POINTER_TYPE_TOUCH;
            event.MSPOINTER_TYPE_PEN = FakeTouches.POINTER_TYPE_PEN;

            event.pointerId = touch.identifier;
            event.pointerType = pointerType;
            event.pageX = touch.pageX;
            event.pageY = touch.pageY;
            event.clientX = touch.clientX;
            event.clientY = touch.clientY;
            event.buttons = (type == 'end') ? 0 : 1;

            self.element.dispatchEvent(event);
        });

        return true;
    }
function triggerPointerEvents(type, pointerType) {
        var self = this;
        var names = {
            start: 'MSPointerDown',
            move: 'MSPointerMove',
            end: 'MSPointerUp'
        };

        var touchList = this._createTouchList(this.touches);
        touchList.forEach(function(touch) {
            var event = document.createEvent('Event');
            event.initEvent(names[type], true, true);

            event.MSPOINTER_TYPE_MOUSE = FakeTouches.POINTER_TYPE_MOUSE;
            event.MSPOINTER_TYPE_TOUCH = FakeTouches.POINTER_TYPE_TOUCH;
            event.MSPOINTER_TYPE_PEN = FakeTouches.POINTER_TYPE_PEN;

            event.pointerId = touch.identifier;
            event.pointerType = pointerType;
            event.pageX = touch.pageX;
            event.pageY = touch.pageY;
            event.clientX = touch.clientX;
            event.clientY = touch.clientY;
            event.buttons = (type == 'end') ? 0 : 1;

            self.element.dispatchEvent(event);
        });

        return true;
    }
function triggerPointerEvents ( type , pointerType ) { var self = this ; var names = { start : 'MSPointerDown' , move : 'MSPointerMove' , end : 'MSPointerUp' } ; var touchList = this . _createTouchList ( this . touches ) ; touchList . forEach ( function ( touch ) { var event = document . createEvent ( 'Event' ) ; event . initEvent ( names [ type ] , true , true ) ; event . MSPOINTER_TYPE_MOUSE = FakeTouches . POINTER_TYPE_MOUSE ; event . MSPOINTER_TYPE_TOUCH = FakeTouches . POINTER_TYPE_TOUCH ; event . MSPOINTER_TYPE_PEN = FakeTouches . POINTER_TYPE_PEN ; event . pointerId = touch . identifier ; event . pointerType = pointerType ; event . pageX = touch . pageX ; event . pageY = touch . pageY ; event . clientX = touch . clientX ; event . clientY = touch . clientY ; event . buttons = ( type == 'end' ) ? 0 : 1 ; self . element . dispatchEvent ( event ) ; } ) ; return true ; }
trigger pointer event
@param type
@param pointerType
@returns {Boolean}
trigger pointer event