B2G/gecko/testing/marionette/marionette-listener.js
/**
 * Function that perform a single tap
 */
Function that perform a single tap
Function that perform a single tap
function singleTap(msg) {
  let command_id = msg.json.command_id;
  try {
    let el = elementManager.getKnownElement(msg.json.value, curWindow);
    if (!checkVisible(el)) {
       sendError("Element is not currently visible and may not be manipulated", 11, null, command_id);
       return;
    }
    if (!curWindow.document.createTouch) {
      mouseEventsOnly = true;
    }
    let c = coordinates(el, msg.json.corx, msg.json.cory);
    generateEvents('tap', c.x, c.y, null, el);
    sendOk(msg.json.command_id);
  }
  catch (e) {
    sendError(e.message, e.code, e.stack, msg.json.command_id);
  }
}
function singleTap ( msg ) { let command_id = msg . json . command_id ; try { let el = elementManager . getKnownElement ( msg . json . value , curWindow ) ; if ( ! checkVisible ( el ) ) { sendError ( "Element is not currently visible and may not be manipulated" , 11 , null , command_id ) ; return ; } if ( ! curWindow . document . createTouch ) { mouseEventsOnly = true ; } let c = coordinates ( el , msg . json . corx , msg . json . cory ) ; generateEvents ( 'tap' , c . x , c . y , null , el ) ; sendOk ( msg . json . command_id ) ; } catch ( e ) { sendError ( e . message , e . code , e . stack , msg . json . command_id ) ; } }
Function that perform a single tap
Function that perform a single tap
// after this block, the element will be scrolled into view