Update docs/src/touch-events.md
Co-authored-by: Dmitry Gozman <dgozman@gmail.com> Signed-off-by: Yury Semikhatsky <yurys@chromium.org>
This commit is contained in:
parent
9eedf60f74
commit
9f318edf0f
|
|
@ -7,7 +7,7 @@ title: "Emulating touch events"
|
|||
|
||||
Mobile web sites may listen to [touch events](https://developer.mozilla.org/en-US/docs/Web/API/Touch_events) and react to user touch gestures such as swipe, pinch, tap etc. To test this functionality you can manually generate [TouchEvent]s in the page context using [`method: Locator.evaluate`].
|
||||
|
||||
If your web application relies on [pointer events](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events) instead of touch events, you can use [`method: Locator.click`] and raw mouse events to simulate single touch point events, because pointer events are triggered for both mouse gestures and touch interactions.
|
||||
If your web application relies on [pointer events](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events) instead of touch events, you can use [`method: Locator.click`] and raw [`Mouse`] events to simulate a single-finger touch, and this will trigger all the same pointer events.
|
||||
|
||||
### Dispatching TouchEvent
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue