browserclaw 0.9.5 → 0.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -3098,9 +3098,17 @@ async function pressAndHoldViaCdp(opts) {
3098
3098
  targetId: opts.targetId,
3099
3099
  fn: async (send) => {
3100
3100
  await send("Input.dispatchMouseEvent", { type: "mouseMoved", ...pos });
3101
+ await send("Input.dispatchTouchEvent", {
3102
+ type: "touchStart",
3103
+ touchPoints: [{ x: pos.x, y: pos.y, id: 1 }]
3104
+ });
3101
3105
  await send("Input.dispatchMouseEvent", { type: "mousePressed", ...pos, ...btn });
3102
3106
  await new Promise((r) => setTimeout(r, holdMs));
3103
3107
  await send("Input.dispatchMouseEvent", { type: "mouseReleased", ...pos, ...btn });
3108
+ await send("Input.dispatchTouchEvent", {
3109
+ type: "touchEnd",
3110
+ touchPoints: [{ x: pos.x, y: pos.y, id: 1 }]
3111
+ });
3104
3112
  }
3105
3113
  });
3106
3114
  }