mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs: Document options (#10035)
Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
This commit is contained in:
parent
502458979d
commit
28154eff6f
@ -21,10 +21,10 @@ class ElementHandle {
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ------------------------------------------------------------ | ------------ |
|
| --------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
|
||||||
| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | |
|
| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | |
|
||||||
| options | { threshold?: number; } | _(Optional)_ |
|
| options | { threshold?: number; } | _(Optional)_ Threshold for the intersection between 0 (no intersection) and 1 (full intersection). Defaults to 1. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -23,10 +23,10 @@ class ElementHandle {
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ------------------ | ------------ |
|
| --------- | ------------------ | -------------------------------------------------- |
|
||||||
| text | string | |
|
| text | string | |
|
||||||
| options | { delay: number; } | _(Optional)_ |
|
| options | { delay: number; } | _(Optional)_ Delay in milliseconds. Defaults to 0. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -201,8 +201,10 @@ To deliver to a different location, use the "deliver" option:
|
|||||||
|
|
||||||
## Writing documentation
|
## Writing documentation
|
||||||
|
|
||||||
Documentation is generated via `npm run docs`. It is automatically published to
|
Documentation is generated from TSDoc comments via `npm run docs`. It is automatically
|
||||||
our documentation site on merge and gets versioned on release.
|
published to our documentation site on merge and gets versioned on release.
|
||||||
|
|
||||||
|
This means that you should not change the markdown in files `docs/api` manually.
|
||||||
|
|
||||||
## Writing TSDoc comments
|
## Writing TSDoc comments
|
||||||
|
|
||||||
|
@ -769,6 +769,8 @@ export class ElementHandle<
|
|||||||
* await elementHandle.type('some text');
|
* await elementHandle.type('some text');
|
||||||
* await elementHandle.press('Enter');
|
* await elementHandle.press('Enter');
|
||||||
* ```
|
* ```
|
||||||
|
*
|
||||||
|
* @param options - Delay in milliseconds. Defaults to 0.
|
||||||
*/
|
*/
|
||||||
async type(text: string, options?: {delay: number}): Promise<void>;
|
async type(text: string, options?: {delay: number}): Promise<void>;
|
||||||
async type(): Promise<void> {
|
async type(): Promise<void> {
|
||||||
@ -852,6 +854,9 @@ export class ElementHandle<
|
|||||||
* Resolves to true if the element is visible in the current viewport. If an
|
* Resolves to true if the element is visible in the current viewport. If an
|
||||||
* element is an SVG, we check if the svg owner element is in the viewport
|
* element is an SVG, we check if the svg owner element is in the viewport
|
||||||
* instead. See https://crbug.com/963246.
|
* instead. See https://crbug.com/963246.
|
||||||
|
*
|
||||||
|
* @param options - Threshold for the intersection between 0 (no intersection) and 1
|
||||||
|
* (full intersection). Defaults to 1.
|
||||||
*/
|
*/
|
||||||
async isIntersectingViewport(
|
async isIntersectingViewport(
|
||||||
this: ElementHandle<Element>,
|
this: ElementHandle<Element>,
|
||||||
|
Loading…
Reference in New Issue
Block a user