← Back to Input domain

Input.synthesizeScrollGesture

Synthesizes a scroll gesture over a time period by issuing appropriate touch events.

Domain: Input experimental

Parameters

NameTypeDescription
xnumberX coordinate of the start of the gesture in CSS pixels.
ynumberY coordinate of the start of the gesture in CSS pixels.
xDistance (optional)numberThe distance to scroll along the X axis (positive to scroll left).
yDistance (optional)numberThe distance to scroll along the Y axis (positive to scroll up).
xOverscroll (optional)numberThe number of additional pixels to scroll back along the X axis, in addition to the given distance.
yOverscroll (optional)numberThe number of additional pixels to scroll back along the Y axis, in addition to the given distance.
preventFling (optional)booleanPrevent fling (default: true).
speed (optional)integerSwipe speed in pixels per second (default: 800).
gestureSourceType (optional)GestureSourceTypeWhich type of input events to be generated (default: 'default', which queries the platform for the preferred input type).
repeatCount (optional)integerThe number of times to repeat the gesture (default: 0).
repeatDelayMs (optional)integerThe number of milliseconds delay between each repeat. (default: 250).
interactionMarkerName (optional)stringThe name of the interaction markers to generate, if not empty (default: "").

Example Request

{
  "id": 1,
  "method": "Input.synthesizeScrollGesture",
  "params": {
    "x": 100,
    "y": 100
  }
}

Example Response

{
  "id": 1,
  "result": {}
}

Usage in Node.js

const result = await send('Input.synthesizeScrollGesture', {"x": 100, "y": 100});
console.log(result);