MCPcopy
hub / github.com/SeleniumHQ/selenium / createGenericTouchList

Function createGenericTouchList

javascript/atoms/events.js:452–471  ·  view source on GitHub ↗
(touchListArgs)

Source from the content-addressed store, hash-verified

450
451 // Creates a TouchList, using simulated touch Api, for touch events.
452 function createGenericTouchList(touchListArgs) {
453 var touches = goog.array.map(touchListArgs, function (touchArg) {
454 // The target field is not part of the W3C spec, but both android and iOS
455 // add the target field to each touch.
456 return {
457 identifier: touchArg.identifier,
458 screenX: touchArg.screenX,
459 screenY: touchArg.screenY,
460 clientX: touchArg.clientX,
461 clientY: touchArg.clientY,
462 pageX: touchArg.pageX,
463 pageY: touchArg.pageY,
464 target: target
465 };
466 });
467 touches.item = function (i) {
468 return touches[i];
469 };
470 return touches;
471 }
472
473 function createTouchEventTouchList(touchListArgs) {
474 /** @type {!Array<!Touch>} */

Callers 1

createTouchListFunction · 0.85

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected