docs(new): migrate Touchscreen docs to TSDoc (#6087)

Co-authored-by: martinsplitt <martin@geekonaut.de>
This commit is contained in:
Martin Splitt
2020-06-24 10:34:37 +02:00
committed by Mathias Bynens
parent 73b97956cc
commit 2ad42dc398
5 changed files with 19 additions and 31 deletions

View File

@@ -238,18 +238,25 @@ export class Mouse {
}
}
/**
* The Touchscreen class exposes touchscreen events.
*/
export class Touchscreen {
_client: CDPSession;
_keyboard: Keyboard;
/**
* @internal
*/
constructor(client: CDPSession, keyboard: Keyboard) {
this._client = client;
this._keyboard = keyboard;
}
/**
* @param {number} x
* @param {number} y
* Dispatches a `touchstart` and `touchend` event.
* @param x - Horizontal position of the tap.
* @param y - Vertical position of the tap.
*/
async tap(x: number, y: number): Promise<void> {
// Touches appear to be lost during the first frame after navigation.