← Back to Input domain

Input.dispatchTouchEvent

Dispatches a touch event to the page.

Domain: Input stable

Parameters

NameTypeDescription
typestringType of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one.
touchPointsarrayActive touch points on the touch device. One event per any changed point (compared to previous touch event in a sequence) is generated, emulating pressing/moving/releasing points one by one.
modifiers (optional)integerBit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
timestamp (optional)TimeSinceEpochTime at which the event occurred.

Example Request

{
  "id": 1,
  "method": "Input.dispatchTouchEvent",
  "params": {
    "type": "type-value",
    "touchPoints": []
  }
}

Example Response

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

Usage in Node.js

const result = await send('Input.dispatchTouchEvent', {"type": "type-value", "touchPoints": []});
console.log(result);