mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs(new): add TSDoc comments to Keyboard (#6099)
Co-authored-by: Tim van der Lippe <tvanderlippe@google.com>
This commit is contained in:
committed by
Mathias Bynens
parent
4696f7abda
commit
5b6d2bfb0e
@@ -4,6 +4,8 @@
|
||||
|
||||
## Keyboard.sendCharacter() method
|
||||
|
||||
Dispatches a `keypress` and `input` event. This does not send a `keydown` or `keyup` event.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
@@ -14,9 +16,21 @@ sendCharacter(char: string): Promise<void>;
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| char | string | |
|
||||
| char | string | Character to send into the page. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
Promise<void>
|
||||
|
||||
## Remarks
|
||||
|
||||
Modifier keys DO NOT effect [Keyboard.sendCharacter](./puppeteer.keyboard.sendcharacter.md)<!-- -->. Holding down `Shift` will not type the text in upper case.
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
```js
|
||||
page.keyboard.sendCharacter('嗨');
|
||||
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user