modules/pointerEvents.js
function makePointertapEvent(sourceEvent) {
        var evt = document.createEvent('MouseEvents');
        var newTarget = document.elementFromPoint(sourceEvent.clientX, sourceEvent.clientY);

        // According to the MDN docs if the specified point is outside the visible bounds of the document
        // or either coordinate is negative, the result is null
        if (!newTarget) {
            return null;
        }

        // TODO: Replace 'initMouseEvent' with 'new MouseEvent'
        evt.initMouseEvent('pointertap', true, true, window, 1, sourceEvent.screenX, sourceEvent.screenY,
            sourceEvent.clientX, sourceEvent.clientY, sourceEvent.ctrlKey, sourceEvent.altKey,
            sourceEvent.shiftKey, sourceEvent.metaKey, sourceEvent.button, newTarget);

        evt.maskedEvent = sourceEvent;
        newTarget.dispatchEvent(evt);

        return evt;
    }
function makePointertapEvent(sourceEvent) {
        var evt = document.createEvent('MouseEvents');
        var newTarget = document.elementFromPoint(sourceEvent.clientX, sourceEvent.clientY);

        // According to the MDN docs if the specified point is outside the visible bounds of the document
        // or either coordinate is negative, the result is null
        if (!newTarget) {
            return null;
        }

        // TODO: Replace 'initMouseEvent' with 'new MouseEvent'
        evt.initMouseEvent('pointertap', true, true, window, 1, sourceEvent.screenX, sourceEvent.screenY,
            sourceEvent.clientX, sourceEvent.clientY, sourceEvent.ctrlKey, sourceEvent.altKey,
            sourceEvent.shiftKey, sourceEvent.metaKey, sourceEvent.button, newTarget);

        evt.maskedEvent = sourceEvent;
        newTarget.dispatchEvent(evt);

        return evt;
    }
function makePointertapEvent ( sourceEvent ) { var evt = document . createEvent ( 'MouseEvents' ) ; var newTarget = document . elementFromPoint ( sourceEvent . clientX , sourceEvent . clientY ) ; // According to the MDN docs if the specified point is outside the visible bounds of the document // or either coordinate is negative, the result is null if ( ! newTarget ) { return null ; } // TODO: Replace 'initMouseEvent' with 'new MouseEvent' evt . initMouseEvent ( 'pointertap' , true , true , window , 1 , sourceEvent . screenX , sourceEvent . screenY , sourceEvent . clientX , sourceEvent . clientY , sourceEvent . ctrlKey , sourceEvent . altKey , sourceEvent . shiftKey , sourceEvent . metaKey , sourceEvent . button , newTarget ) ; evt . maskedEvent = sourceEvent ; newTarget . dispatchEvent ( evt ) ; return evt ; }
Creates the pointertap event that is not part of standard.

@private
@param {MouseEvent|PointerEvent} sourceEvent An event to use as a base for pointertap.
Creates the pointertap event that is not part of standard .