docs: update docs about touchmove (#10847)

This commit is contained in:
Alex Rudenko 2023-09-05 10:42:19 +02:00 committed by GitHub
parent 0ab6f76945
commit 73f741ea33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -24,3 +24,7 @@ class Touchscreen {
**Returns:** **Returns:**
Promise<void> Promise<void>
## Remarks
Not every `touchMove` call results in a `touchmove` event being emitted, depending on the browser's optimizations. For example, Chrome [throttles](https://developer.chrome.com/blog/a-more-compatible-smoother-touch/#chromes-new-model-the-throttled-async-touchmove-model) touch move events.

View File

@ -552,6 +552,13 @@ export class Touchscreen {
* Dispatches a `touchMove` event. * Dispatches a `touchMove` event.
* @param x - Horizontal position of the move. * @param x - Horizontal position of the move.
* @param y - Vertical position of the move. * @param y - Vertical position of the move.
*
* @remarks
*
* Not every `touchMove` call results in a `touchmove` event being emitted,
* depending on the browser's optimizations. For example, Chrome
* {@link https://developer.chrome.com/blog/a-more-compatible-smoother-touch/#chromes-new-model-the-throttled-async-touchmove-model | throttles}
* touch move events.
*/ */
async touchMove(x: number, y: number): Promise<void>; async touchMove(x: number, y: number): Promise<void>;
async touchMove(): Promise<void> { async touchMove(): Promise<void> {