docs(new): migrate Touchscreen docs to TSDoc (#6087)
Co-authored-by: martinsplitt <martin@geekonaut.de>
This commit is contained in:
parent
73b97956cc
commit
2ad42dc398
@ -33,7 +33,7 @@
|
||||
| [SecurityDetails](./puppeteer.securitydetails.md) | The SecurityDetails class represents the security details of a response that was received over a secure connection. |
|
||||
| [Target](./puppeteer.target.md) | |
|
||||
| [TimeoutError](./puppeteer.timeouterror.md) | TimeoutError is emitted whenever certain operations are terminated due to timeout. |
|
||||
| [Touchscreen](./puppeteer.touchscreen.md) | |
|
||||
| [Touchscreen](./puppeteer.touchscreen.md) | The Touchscreen class exposes touchscreen events. |
|
||||
| [Tracing](./puppeteer.tracing.md) | |
|
||||
| [WebWorker](./puppeteer.webworker.md) | The WebWorker class represents a [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API)<!-- -->. |
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [Touchscreen](./puppeteer.touchscreen.md) > [(constructor)](./puppeteer.touchscreen._constructor_.md)
|
||||
|
||||
## Touchscreen.(constructor)
|
||||
|
||||
Constructs a new instance of the `Touchscreen` class
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
constructor(client: CDPSession, keyboard: Keyboard);
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| client | [CDPSession](./puppeteer.cdpsession.md) | |
|
||||
| keyboard | [Keyboard](./puppeteer.keyboard.md) | |
|
||||
|
@ -4,17 +4,17 @@
|
||||
|
||||
## Touchscreen class
|
||||
|
||||
The Touchscreen class exposes touchscreen events.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
export declare class Touchscreen
|
||||
```
|
||||
|
||||
## Constructors
|
||||
## Remarks
|
||||
|
||||
| Constructor | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [(constructor)(client, keyboard)](./puppeteer.touchscreen._constructor_.md) | | Constructs a new instance of the <code>Touchscreen</code> class |
|
||||
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `Touchscreen` class.
|
||||
|
||||
## Properties
|
||||
|
||||
@ -27,5 +27,5 @@ export declare class Touchscreen
|
||||
|
||||
| Method | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [tap(x, y)](./puppeteer.touchscreen.tap.md) | | |
|
||||
| [tap(x, y)](./puppeteer.touchscreen.tap.md) | | Dispatches a <code>touchstart</code> and <code>touchend</code> event. |
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
## Touchscreen.tap() method
|
||||
|
||||
Dispatches a `touchstart` and `touchend` event.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
@ -14,8 +16,8 @@ tap(x: number, y: number): Promise<void>;
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| x | number | |
|
||||
| y | number | |
|
||||
| x | number | Horizontal position of the tap. |
|
||||
| y | number | Vertical position of the tap. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user