diff --git a/docs/api/puppeteer.elementhandle.isintersectingviewport.md b/docs/api/puppeteer.elementhandle.isintersectingviewport.md index c7d0861e..691fac62 100644 --- a/docs/api/puppeteer.elementhandle.isintersectingviewport.md +++ b/docs/api/puppeteer.elementhandle.isintersectingviewport.md @@ -21,10 +21,10 @@ class ElementHandle { ## Parameters -| Parameter | Type | Description | -| --------- | ------------------------------------------------------------ | ------------ | -| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | | -| options | { threshold?: number; } | _(Optional)_ | +| Parameter | Type | Description | +| --------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- | +| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | | +| options | { threshold?: number; } | _(Optional)_ Threshold for the intersection between 0 (no intersection) and 1 (full intersection). Defaults to 1. | **Returns:** diff --git a/docs/api/puppeteer.elementhandle.type.md b/docs/api/puppeteer.elementhandle.type.md index 323540b0..3ee7cf59 100644 --- a/docs/api/puppeteer.elementhandle.type.md +++ b/docs/api/puppeteer.elementhandle.type.md @@ -23,10 +23,10 @@ class ElementHandle { ## Parameters -| Parameter | Type | Description | -| --------- | ------------------ | ------------ | -| text | string | | -| options | { delay: number; } | _(Optional)_ | +| Parameter | Type | Description | +| --------- | ------------------ | -------------------------------------------------- | +| text | string | | +| options | { delay: number; } | _(Optional)_ Delay in milliseconds. Defaults to 0. | **Returns:** diff --git a/docs/contributing.md b/docs/contributing.md index a35ea55d..e6c83dd0 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -201,8 +201,10 @@ To deliver to a different location, use the "deliver" option: ## Writing documentation -Documentation is generated via `npm run docs`. It is automatically published to -our documentation site on merge and gets versioned on release. +Documentation is generated from TSDoc comments via `npm run docs`. It is automatically +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 diff --git a/packages/puppeteer-core/src/api/ElementHandle.ts b/packages/puppeteer-core/src/api/ElementHandle.ts index 85b7c1f5..8b9aafcc 100644 --- a/packages/puppeteer-core/src/api/ElementHandle.ts +++ b/packages/puppeteer-core/src/api/ElementHandle.ts @@ -769,6 +769,8 @@ export class ElementHandle< * await elementHandle.type('some text'); * await elementHandle.press('Enter'); * ``` + * + * @param options - Delay in milliseconds. Defaults to 0. */ async type(text: string, options?: {delay: number}): Promise; async type(): Promise { @@ -852,6 +854,9 @@ export class ElementHandle< * 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 * 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( this: ElementHandle,