MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / addTouch

Function addTouch

javascript/atoms/device.js:222–240  ·  view source on GitHub ↗
(identifier, coords)

Source from the content-addressed store, hash-verified

220 var pageOffset = goog.dom.getDomHelper(this.element_).getDocumentScroll();
221
222 function addTouch(identifier, coords) {
223 // Android devices leave identifier to zero.
224 var touch = {
225 identifier: identifier,
226 screenX: coords.x,
227 screenY: coords.y,
228 clientX: coords.x,
229 clientY: coords.y,
230 pageX: coords.x + pageOffset.x,
231 pageY: coords.y + pageOffset.y
232 };
233
234 args.changedTouches.push(touch);
235 if (type == bot.events.EventType.TOUCHSTART ||
236 type == bot.events.EventType.TOUCHMOVE) {
237 args.touches.push(touch);
238 args.targetTouches.push(touch);
239 }
240 }
241
242 addTouch(id, coord);
243 if (opt_id2 !== undefined) {

Callers 1

device.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected