B2G/gecko/testing/marionette/marionette-listener.js
/**
 * Function to create a touch based on the element
 * corx and cory are relative to the viewport, id is the touchId
 */
Function to create a touch based on the element
corx and cory are relative to the viewport, id is the touchId
Function to create a touch based on the element corx and cory are relative to the viewport id is the touchId
function createATouch(el, corx, cory, touchId) {
  let doc = el.ownerDocument;
  let win = doc.defaultView;
  let clientX = corx;
  let clientY = cory;
  let pageX = clientX + win.pageXOffset,
      pageY = clientY + win.pageYOffset;
  let screenX = clientX + win.mozInnerScreenX,
      screenY = clientY + win.mozInnerScreenY;
  let atouch = doc.createTouch(win, el, touchId, pageX, pageY, screenX, screenY, clientX, clientY);
  return atouch;
}
function createATouch ( el , corx , cory , touchId ) { let doc = el . ownerDocument ; let win = doc . defaultView ; let clientX = corx ; let clientY = cory ; let pageX = clientX + win . pageXOffset , pageY = clientY + win . pageYOffset ; let screenX = clientX + win . mozInnerScreenX , screenY = clientY + win . mozInnerScreenY ; let atouch = doc . createTouch ( win , el , touchId , pageX , pageY , screenX , screenY , clientX , clientY ) ; return atouch ; }
Function to create a touch based on the element
 corx and cory are relative to the viewport, id is the touchId
Function to create a touch based on the element corx and cory are relative to the viewport id is the touchId