mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs: Upgrading to Docusaurus V3 (#11434)
Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
This commit is contained in:
parent
f67ee9fea7
commit
39e3d4bceb
@ -12,6 +12,6 @@ export interface AutofillData
|
|||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
| Property | Modifiers | Type | Description | Default |
|
| Property | Modifiers | Type | Description | Default |
|
||||||
| ---------- | --------- | --------------------------------------------------------------------------------------- | ----------- | ------- |
|
| ---------- | --------- | ------------------------------------------------------------------------------------------------- | ----------- | ------- |
|
||||||
| creditCard | | { number: string; name: string; expiryMonth: string; expiryYear: string; cvc: string; } | | |
|
| creditCard | | { number: string; name: string; expiryMonth: string; expiryYear: string; cvc: string; } | | |
|
||||||
|
@ -14,11 +14,11 @@ export interface BrowserConnectOptions
|
|||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
| Property | Modifiers | Type | Description | Default |
|
| Property | Modifiers | Type | Description | Default |
|
||||||
| ----------------- | --------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------- | --------------------------- |
|
| ----------------- | --------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ------------------------------------- |
|
||||||
| defaultViewport | <code>optional</code> | [Viewport](./puppeteer.viewport.md) \| null | Sets the viewport for each page. | '{width: 800, height: 600}' |
|
| defaultViewport | <code>optional</code> | [Viewport](./puppeteer.viewport.md) \| null | Sets the viewport for each page. | '{width: 800, height: 600}' |
|
||||||
| ignoreHTTPSErrors | <code>optional</code> | boolean | Whether to ignore HTTPS errors during navigation. | <code>false</code> |
|
| ignoreHTTPSErrors | <code>optional</code> | boolean | Whether to ignore HTTPS errors during navigation. | <code>false</code> |
|
||||||
| protocol | <code>optional</code> | [ProtocolType](./puppeteer.protocoltype.md) | | 'cdp' |
|
| protocol | <code>optional</code> | [ProtocolType](./puppeteer.protocoltype.md) | | 'cdp' |
|
||||||
| protocolTimeout | <code>optional</code> | number | Timeout setting for individual protocol (CDP) calls. | <code>180_000</code> |
|
| protocolTimeout | <code>optional</code> | number | Timeout setting for individual protocol (CDP) calls. | <code>180_000</code> |
|
||||||
| slowMo | <code>optional</code> | number | Slows down Puppeteer operations by the specified amount of milliseconds to aid debugging. | |
|
| slowMo | <code>optional</code> | number | Slows down Puppeteer operations by the specified amount of milliseconds to aid debugging. | |
|
||||||
| targetFilter | <code>optional</code> | [TargetFilterCallback](./puppeteer.targetfiltercallback.md) | Callback to decide if Puppeteer should connect to a given target or not. | |
|
| targetFilter | <code>optional</code> | [TargetFilterCallback](./puppeteer.targetfiltercallback.md) | Callback to decide if Puppeteer should connect to a given target or not. | |
|
||||||
|
@ -14,8 +14,8 @@ export interface CoverageEntry
|
|||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
| Property | Modifiers | Type | Description | Default |
|
| Property | Modifiers | Type | Description | Default |
|
||||||
| -------- | --------- | -------------------------------------------- | --------------------------------------------- | ------- |
|
| -------- | --------- | ------------------------------------------------------ | --------------------------------------------- | ------- |
|
||||||
| ranges | | Array<{ start: number; end: number; }> | The covered range as start and end positions. | |
|
| ranges | | Array<{ start: number; end: number; }> | The covered range as start and end positions. | |
|
||||||
| text | | string | The content of the style sheet or script. | |
|
| text | | string | The content of the style sheet or script. | |
|
||||||
| url | | string | The URL of the style sheet or script. | |
|
| url | | string | The URL of the style sheet or script. | |
|
||||||
|
@ -14,9 +14,9 @@ class CSSCoverage {
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | -------------------------------- | ------------ |
|
| --------- | ------------------------------------------ | ------------ |
|
||||||
| options | { resetOnNavigation?: boolean; } | _(Optional)_ |
|
| options | { resetOnNavigation?: boolean; } | _(Optional)_ |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class ElementHandle {
|
|||||||
| --------- | ------------------------------------------------------------ | ------------ |
|
| --------- | ------------------------------------------------------------ | ------------ |
|
||||||
| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | |
|
| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | |
|
||||||
| target | [ElementHandle](./puppeteer.elementhandle.md)<Node> | |
|
| target | [ElementHandle](./puppeteer.elementhandle.md)<Node> | |
|
||||||
| options | { delay: number; } | _(Optional)_ |
|
| options | { delay: number; } | _(Optional)_ |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ class ElementHandle {
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
|
| --------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
|
||||||
| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | |
|
| 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. |
|
| options | { threshold?: number; } | _(Optional)_ Threshold for the intersection between 0 (no intersection) and 1 (full intersection). Defaults to 1. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -20,9 +20,9 @@ class ElementHandle {
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | --------------------------------------------------------------------------------------------------- | ----------- |
|
| --------- | ------------------------------------------------------------------------------------------------------------- | ----------- |
|
||||||
| options | Readonly<[ScreenshotOptions](./puppeteer.screenshotoptions.md)> & { encoding: 'base64'; } | |
|
| options | Readonly<[ScreenshotOptions](./puppeteer.screenshotoptions.md)> & { encoding: 'base64'; } | |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -33,10 +33,10 @@ class ElementHandle {
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
| --------- | -------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
||||||
| xpath | string | A [xpath](https://developer.mozilla.org/en-US/docs/Web/XPath) of an element to wait for |
|
| xpath | string | A [xpath](https://developer.mozilla.org/en-US/docs/Web/XPath) of an element to wait for |
|
||||||
| options | { visible?: boolean; hidden?: boolean; timeout?: number; } | _(Optional)_ Optional waiting parameters |
|
| options | { visible?: boolean; hidden?: boolean; timeout?: number; } | _(Optional)_ Optional waiting parameters |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -24,10 +24,10 @@ class Frame {
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |
|
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
||||||
| url | string | URL to navigate the frame to. The URL should include scheme, e.g. <code>https://</code> |
|
| url | string | URL to navigate the frame to. The URL should include scheme, e.g. <code>https://</code> |
|
||||||
| options | { referer?: string; referrerPolicy?: string; timeout?: number; waitUntil?: [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md) \| [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md)\[\]; } | _(Optional)_ Options to configure waiting behavior. |
|
| options | { referer?: string; referrerPolicy?: string; timeout?: number; waitUntil?: [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md) \| [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md)\[\]; } | _(Optional)_ Options to configure waiting behavior. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -22,10 +22,10 @@ class Frame {
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| html | string | HTML markup to assign to the page. |
|
| html | string | HTML markup to assign to the page. |
|
||||||
| options | { timeout?: number; waitUntil?: [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md) \| [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md)\[\]; } | _(Optional)_ Options to configure how long before timing out and at what point to consider the content setting successful. |
|
| options | { timeout?: number; waitUntil?: [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md) \| [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md)\[\]; } | _(Optional)_ Options to configure how long before timing out and at what point to consider the content setting successful. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ class HTTPRequest {
|
|||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
{ errorText: string; } \| null
|
{ errorText: string; } \| null
|
||||||
|
|
||||||
`null` unless the request failed. If the request fails this can return an object with `errorText` containing a human-readable error message, e.g. `net::ERR_FAILED`. It is not guaranteed that there will be failure text if the request fails.
|
`null` unless the request failed. If the request fails this can return an object with `errorText` containing a human-readable error message, e.g. `net::ERR_FAILED`. It is not guaranteed that there will be failure text if the request fails.
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@ class JSCoverage {
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------ |
|
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
|
||||||
| options | { resetOnNavigation?: boolean; reportAnonymousScripts?: boolean; includeRawScriptCoverage?: boolean; useBlockCoverage?: boolean; } | _(Optional)_ |
|
| options | { resetOnNavigation?: boolean; reportAnonymousScripts?: boolean; includeRawScriptCoverage?: boolean; useBlockCoverage?: boolean; } | _(Optional)_ |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class Mouse {
|
|||||||
| --------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| start | [Point](./puppeteer.point.md) | point to drag from |
|
| start | [Point](./puppeteer.point.md) | point to drag from |
|
||||||
| target | [Point](./puppeteer.point.md) | point to drop on |
|
| target | [Point](./puppeteer.point.md) | point to drop on |
|
||||||
| options | { delay?: number; } | _(Optional)_ An object of options. Accepts delay which, if specified, is the time to wait between <code>dragover</code> and <code>drop</code> in milliseconds. Defaults to 0. |
|
| options | { delay?: number; } | _(Optional)_ An object of options. Accepts delay which, if specified, is the time to wait between <code>dragover</code> and <code>drop</code> in milliseconds. Defaults to 0. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -14,9 +14,9 @@ class Page {
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ------------------------------ | ------------ |
|
| --------- | ---------------------------------------- | ------------ |
|
||||||
| options | { runBeforeUnload?: boolean; } | _(Optional)_ |
|
| options | { runBeforeUnload?: boolean; } | _(Optional)_ |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@ class Page {
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ----------------------------------------------------- | --------------------------------------------------------------- |
|
| --------- | --------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||||
| overrides | { isUserActive: boolean; isScreenUnlocked: boolean; } | _(Optional)_ Mock idle state. If not set, clears idle overrides |
|
| overrides | { isUserActive: boolean; isScreenUnlocked: boolean; } | _(Optional)_ Mock idle state. If not set, clears idle overrides |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -31,10 +31,10 @@ class Page {
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| ------------ | ---------------------------------- | -------------------------------------------------------------- |
|
| ------------ | -------------------------------------------- | -------------------------------------------------------------- |
|
||||||
| name | string | Name of the function on the window object |
|
| name | string | Name of the function on the window object |
|
||||||
| pptrFunction | Function \| { default: Function; } | Callback function which will be called in Puppeteer's context. |
|
| pptrFunction | Function \| { default: Function; } | Callback function which will be called in Puppeteer's context. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -20,9 +20,9 @@ class Page {
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | --------------------------------------------------------------------------------------------------- | ------------------------------- |
|
| --------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- |
|
||||||
| options | Readonly<[ScreenshotOptions](./puppeteer.screenshotoptions.md)> & { encoding: 'base64'; } | Configures screenshot behavior. |
|
| options | Readonly<[ScreenshotOptions](./puppeteer.screenshotoptions.md)> & { encoding: 'base64'; } | Configures screenshot behavior. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -17,9 +17,9 @@ class Page {
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---------------------------------------- | ---------------------------------------- |
|
| --------- | -------------------------------------------------- | ---------------------------------------- |
|
||||||
| options | { idleTime?: number; timeout?: number; } | _(Optional)_ Optional waiting parameters |
|
| options | { idleTime?: number; timeout?: number; } | _(Optional)_ Optional waiting parameters |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ class Page {
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| -------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------- |
|
| -------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------- |
|
||||||
| urlOrPredicate | string \| ((req: [HTTPRequest](./puppeteer.httprequest.md)) => boolean \| Promise<boolean>) | A URL or predicate to wait for |
|
| urlOrPredicate | string \| ((req: [HTTPRequest](./puppeteer.httprequest.md)) => boolean \| Promise<boolean>) | A URL or predicate to wait for |
|
||||||
| options | { timeout?: number; } | _(Optional)_ Optional waiting parameters |
|
| options | { timeout?: number; } | _(Optional)_ Optional waiting parameters |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ class Page {
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| -------------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------- |
|
| -------------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------- |
|
||||||
| urlOrPredicate | string \| ((res: [HTTPResponse](./puppeteer.httpresponse.md)) => boolean \| Promise<boolean>) | A URL or predicate to wait for. |
|
| urlOrPredicate | string \| ((res: [HTTPResponse](./puppeteer.httpresponse.md)) => boolean \| Promise<boolean>) | A URL or predicate to wait for. |
|
||||||
| options | { timeout?: number; } | _(Optional)_ Optional waiting parameters |
|
| options | { timeout?: number; } | _(Optional)_ Optional waiting parameters |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -18,24 +18,24 @@ export interface PageEvents extends Record<EventType, unknown>
|
|||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
| Property | Modifiers | Type | Description | Default |
|
| Property | Modifiers | Type | Description | Default |
|
||||||
| ---------------------- | --------- | -------------------------------------------------------------- | ----------- | ------- |
|
| ---------------------- | --------- | ------------------------------------------------------------------------ | ----------- | ------- |
|
||||||
| close | | undefined | | |
|
| close | | undefined | | |
|
||||||
| console | | [ConsoleMessage](./puppeteer.consolemessage.md) | | |
|
| console | | [ConsoleMessage](./puppeteer.consolemessage.md) | | |
|
||||||
| dialog | | [Dialog](./puppeteer.dialog.md) | | |
|
| dialog | | [Dialog](./puppeteer.dialog.md) | | |
|
||||||
| domcontentloaded | | undefined | | |
|
| domcontentloaded | | undefined | | |
|
||||||
| error | | Error | | |
|
| error | | Error | | |
|
||||||
| frameattached | | [Frame](./puppeteer.frame.md) | | |
|
| frameattached | | [Frame](./puppeteer.frame.md) | | |
|
||||||
| framedetached | | [Frame](./puppeteer.frame.md) | | |
|
| framedetached | | [Frame](./puppeteer.frame.md) | | |
|
||||||
| framenavigated | | [Frame](./puppeteer.frame.md) | | |
|
| framenavigated | | [Frame](./puppeteer.frame.md) | | |
|
||||||
| load | | undefined | | |
|
| load | | undefined | | |
|
||||||
| metrics | | { title: string; metrics: [Metrics](./puppeteer.metrics.md); } | | |
|
| metrics | | { title: string; metrics: [Metrics](./puppeteer.metrics.md); } | | |
|
||||||
| pageerror | | Error | | |
|
| pageerror | | Error | | |
|
||||||
| popup | | [Page](./puppeteer.page.md) \| null | | |
|
| popup | | [Page](./puppeteer.page.md) \| null | | |
|
||||||
| request | | [HTTPRequest](./puppeteer.httprequest.md) | | |
|
| request | | [HTTPRequest](./puppeteer.httprequest.md) | | |
|
||||||
| requestfailed | | [HTTPRequest](./puppeteer.httprequest.md) | | |
|
| requestfailed | | [HTTPRequest](./puppeteer.httprequest.md) | | |
|
||||||
| requestfinished | | [HTTPRequest](./puppeteer.httprequest.md) | | |
|
| requestfinished | | [HTTPRequest](./puppeteer.httprequest.md) | | |
|
||||||
| requestservedfromcache | | [HTTPRequest](./puppeteer.httprequest.md) | | |
|
| requestservedfromcache | | [HTTPRequest](./puppeteer.httprequest.md) | | |
|
||||||
| response | | [HTTPResponse](./puppeteer.httpresponse.md) | | |
|
| response | | [HTTPResponse](./puppeteer.httpresponse.md) | | |
|
||||||
| workercreated | | [WebWorker](./puppeteer.webworker.md) | | |
|
| workercreated | | [WebWorker](./puppeteer.webworker.md) | | |
|
||||||
| workerdestroyed | | [WebWorker](./puppeteer.webworker.md) | | |
|
| workerdestroyed | | [WebWorker](./puppeteer.webworker.md) | | |
|
||||||
|
@ -16,6 +16,6 @@ export interface ScreencastOptions
|
|||||||
| ---------- | --------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- |
|
| ---------- | --------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- |
|
||||||
| crop | <code>optional</code> | [BoundingBox](./puppeteer.boundingbox.md) | Specifies the region of the viewport to crop. | |
|
| crop | <code>optional</code> | [BoundingBox](./puppeteer.boundingbox.md) | Specifies the region of the viewport to crop. | |
|
||||||
| ffmpegPath | <code>optional</code> | string | <p>Path to the \[ffmpeg\](https://ffmpeg.org/).</p><p>Required if <code>ffmpeg</code> is not in your PATH.</p> | |
|
| ffmpegPath | <code>optional</code> | string | <p>Path to the \[ffmpeg\](https://ffmpeg.org/).</p><p>Required if <code>ffmpeg</code> is not in your PATH.</p> | |
|
||||||
| path | <code>optional</code> | \`${string}.webm\` | File path to save the screencast to. | |
|
| path | <code>optional</code> | \`${string}.webm\` | File path to save the screencast to. | |
|
||||||
| scale | <code>optional</code> | number | <p>Scales the output video.</p><p>For example, <code>0.5</code> will shrink the width and height of the output video by half. <code>2</code> will double the width and height of the output video.</p> | <code>1</code> |
|
| scale | <code>optional</code> | number | <p>Scales the output video.</p><p>For example, <code>0.5</code> will shrink the width and height of the output video by half. <code>2</code> will double the width and height of the output video.</p> | <code>1</code> |
|
||||||
| speed | <code>optional</code> | number | <p>Specifies the speed to record at.</p><p>For example, <code>0.5</code> will slowdown the output video by 50%. <code>2</code> will double the speed of the output video.</p> | <code>1</code> |
|
| speed | <code>optional</code> | number | <p>Specifies the speed to record at.</p><p>For example, <code>0.5</code> will slowdown the output video by 50%. <code>2</code> will double the speed of the output video.</p> | <code>1</code> |
|
||||||
|
@ -32,7 +32,7 @@ class CLI {
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
|
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
|
||||||
| opts | string \| { cachePath?: string; scriptName?: string; prefixCommand?: { cmd: string; description: string; }; allowCachePathOverride?: boolean; pinnedBrowsers?: Partial<{ \[key in [Browser](./browsers.browser.md)\]: string; }>; } | _(Optional)_ |
|
| opts | string \| { cachePath?: string; scriptName?: string; prefixCommand?: { cmd: string; description: string; }; allowCachePathOverride?: boolean; pinnedBrowsers?: Partial<{ \[key in [Browser](./browsers.browser.md)\]: string; }>; } | _(Optional)_ |
|
||||||
| rl | readline.Interface | _(Optional)_ |
|
| rl | readline.Interface | _(Optional)_ |
|
||||||
|
@ -16,9 +16,9 @@ export declare function install(
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ----------------------------------------------------------------------- | ----------- |
|
| --------- | --------------------------------------------------------------------------------- | ----------- |
|
||||||
| options | [InstallOptions](./browsers.installoptions.md) & { unpack?: true; } | |
|
| options | [InstallOptions](./browsers.installoptions.md) & { unpack?: true; } | |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -16,9 +16,9 @@ export declare function install(
|
|||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ----------------------------------------------------------------------- | ----------- |
|
| --------- | --------------------------------------------------------------------------------- | ----------- |
|
||||||
| options | [InstallOptions](./browsers.installoptions.md) & { unpack: false; } | |
|
| options | [InstallOptions](./browsers.installoptions.md) & { unpack: false; } | |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ patches and contributions!
|
|||||||
Contributions to this project must be accompanied by a Contributor License
|
Contributions to this project must be accompanied by a Contributor License
|
||||||
Agreement. You (or your employer) retain the copyright to your contribution,
|
Agreement. You (or your employer) retain the copyright to your contribution,
|
||||||
this simply gives us permission to use and redistribute your contributions as
|
this simply gives us permission to use and redistribute your contributions as
|
||||||
part of the project. Head over to <https://cla.developers.google.com/> to see
|
part of the project. Head over to <[https://cla.developers.google.com/](https://cla.developers.google.com/)> to see
|
||||||
your current agreements on file or to sign a new one.
|
your current agreements on file or to sign a new one.
|
||||||
|
|
||||||
You generally only need to submit a CLA once, so if you've already submitted one
|
You generally only need to submit a CLA once, so if you've already submitted one
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
import type {DocumenterConfig} from '@microsoft/api-documenter/lib/documenters/DocumenterConfig.js';
|
import type {DocumenterConfig} from '@microsoft/api-documenter/lib/documenters/DocumenterConfig.js';
|
||||||
import {CustomMarkdownEmitter} from '@microsoft/api-documenter/lib/markdown/CustomMarkdownEmitter.js';
|
import {CustomMarkdownEmitter as ApiFormatterMarkdownEmitter} from '@microsoft/api-documenter/lib/markdown/CustomMarkdownEmitter.js';
|
||||||
import {CustomDocNodes} from '@microsoft/api-documenter/lib/nodes/CustomDocNodeKind.js';
|
import {CustomDocNodes} from '@microsoft/api-documenter/lib/nodes/CustomDocNodeKind.js';
|
||||||
import {DocEmphasisSpan} from '@microsoft/api-documenter/lib/nodes/DocEmphasisSpan.js';
|
import {DocEmphasisSpan} from '@microsoft/api-documenter/lib/nodes/DocEmphasisSpan.js';
|
||||||
import {DocHeading} from '@microsoft/api-documenter/lib/nodes/DocHeading.js';
|
import {DocHeading} from '@microsoft/api-documenter/lib/nodes/DocHeading.js';
|
||||||
@ -93,6 +93,32 @@ export interface IMarkdownDocumenterOptions {
|
|||||||
outputFolder: string;
|
outputFolder: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class CustomMarkdownEmitter extends ApiFormatterMarkdownEmitter {
|
||||||
|
protected override getEscapedText(text: string): string {
|
||||||
|
const textWithBackslashes: string = text
|
||||||
|
.replace(/\\/g, '\\\\') // first replace the escape character
|
||||||
|
.replace(/[*#[\]_|`~]/g, x => {
|
||||||
|
return '\\' + x;
|
||||||
|
}) // then escape any special characters
|
||||||
|
.replace(/---/g, '\\-\\-\\-') // hyphens only if it's 3 or more
|
||||||
|
.replace(/&/g, '&')
|
||||||
|
.replace(/</g, '<')
|
||||||
|
.replace(/>/g, '>')
|
||||||
|
.replace(/\{/g, '{')
|
||||||
|
.replace(/\}/g, '}');
|
||||||
|
return textWithBackslashes;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override getTableEscapedText(text: string): string {
|
||||||
|
return text
|
||||||
|
.replace(/&/g, '&')
|
||||||
|
.replace(/"/g, '"')
|
||||||
|
.replace(/</g, '<')
|
||||||
|
.replace(/>/g, '>')
|
||||||
|
.replace(/\|/g, '|');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders API documentation in the Markdown file format.
|
* Renders API documentation in the Markdown file format.
|
||||||
* For more info: https://en.wikipedia.org/wiki/Markdown
|
* For more info: https://en.wikipedia.org/wiki/Markdown
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Website
|
# Website
|
||||||
|
|
||||||
This website is built using [Docusaurus 2](https://docusaurus.io/).
|
This website is built using [Docusaurus 3](https://docusaurus.io/).
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
|
@ -19,8 +19,9 @@
|
|||||||
|
|
||||||
const assert = require('assert');
|
const assert = require('assert');
|
||||||
|
|
||||||
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
const {themes} = require('prism-react-renderer');
|
||||||
const lightCodeTheme = require('prism-react-renderer/themes/github');
|
const darkCodeTheme = themes.dracula;
|
||||||
|
const lightCodeTheme = themes.github;
|
||||||
const semver = require('semver');
|
const semver = require('semver');
|
||||||
|
|
||||||
const archivedVersions = require('./versionsArchived.json');
|
const archivedVersions = require('./versionsArchived.json');
|
||||||
@ -340,6 +341,7 @@ const config = {
|
|||||||
prism: {
|
prism: {
|
||||||
theme: lightCodeTheme,
|
theme: lightCodeTheme,
|
||||||
darkTheme: darkCodeTheme,
|
darkTheme: darkCodeTheme,
|
||||||
|
additionalLanguages: ['bash', 'diff', 'json'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
18836
website/package-lock.json
generated
18836
website/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -15,18 +15,18 @@
|
|||||||
"archive": "node archive.js"
|
"archive": "node archive.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/core": "2.4.1",
|
"@docusaurus/core": "3.0.0",
|
||||||
"@docusaurus/plugin-client-redirects": "2.4.1",
|
"@docusaurus/plugin-client-redirects": "3.0.0",
|
||||||
"@docusaurus/preset-classic": "2.4.1",
|
"@docusaurus/preset-classic": "3.0.0",
|
||||||
"@mdx-js/react": "1.6.22",
|
"@mdx-js/react": "3.0.0",
|
||||||
"clsx": "1.2.1",
|
"clsx": "1.2.1",
|
||||||
"prism-react-renderer": "1.3.5",
|
"prism-react-renderer": "2.1.0",
|
||||||
"semver": "7.5.4",
|
"semver": "7.5.4",
|
||||||
"react": "17.0.2",
|
"react": "18.2.0",
|
||||||
"react-dom": "17.0.2"
|
"react-dom": "18.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@docusaurus/module-type-aliases": "2.4.1",
|
"@docusaurus/module-type-aliases": "3.0.0",
|
||||||
"swc-loader": "0.2.3"
|
"swc-loader": "0.2.3"
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
|
@ -14,4 +14,4 @@ export interface AutofillData
|
|||||||
|
|
||||||
| Property | Modifiers | Type | Description | Default |
|
| Property | Modifiers | Type | Description | Default |
|
||||||
| ---------- | --------- | --------------------------------------------------------------------------------------- | ----------- | ------- |
|
| ---------- | --------- | --------------------------------------------------------------------------------------- | ----------- | ------- |
|
||||||
| creditCard | | { number: string; name: string; expiryMonth: string; expiryYear: string; cvc: string; } | | |
|
| creditCard | | \{ number: string; name: string; expiryMonth: string; expiryYear: string; cvc: string; \} | | |
|
||||||
|
@ -78,4 +78,4 @@ await browser2.close();
|
|||||||
| [userAgent()](./puppeteer.browser.useragent.md) | | <p>Gets this [browser's](./puppeteer.browser.md) original user agent.</p><p>[Pages](./puppeteer.page.md) can override the user agent with [Page.setUserAgent()](./puppeteer.page.setuseragent.md).</p> |
|
| [userAgent()](./puppeteer.browser.useragent.md) | | <p>Gets this [browser's](./puppeteer.browser.md) original user agent.</p><p>[Pages](./puppeteer.page.md) can override the user agent with [Page.setUserAgent()](./puppeteer.page.setuseragent.md).</p> |
|
||||||
| [version()](./puppeteer.browser.version.md) | | <p>Gets a string representing this [browser's](./puppeteer.browser.md) name and version.</p><p>For headless browser, this is similar to <code>"HeadlessChrome/61.0.3153.0"</code>. For non-headless or new-headless, this is similar to <code>"Chrome/61.0.3153.0"</code>. For Firefox, it is similar to <code>"Firefox/116.0a1"</code>.</p><p>The format of [Browser.version()](./puppeteer.browser.version.md) might change with future releases of browsers.</p> |
|
| [version()](./puppeteer.browser.version.md) | | <p>Gets a string representing this [browser's](./puppeteer.browser.md) name and version.</p><p>For headless browser, this is similar to <code>"HeadlessChrome/61.0.3153.0"</code>. For non-headless or new-headless, this is similar to <code>"Chrome/61.0.3153.0"</code>. For Firefox, it is similar to <code>"Firefox/116.0a1"</code>.</p><p>The format of [Browser.version()](./puppeteer.browser.version.md) might change with future releases of browsers.</p> |
|
||||||
| [waitForTarget(predicate, options)](./puppeteer.browser.waitfortarget.md) | | <p>Waits until a [target](./puppeteer.target.md) matching the given <code>predicate</code> appears and returns it.</p><p>This will look all open [browser contexts](./puppeteer.browsercontext.md).</p> |
|
| [waitForTarget(predicate, options)](./puppeteer.browser.waitfortarget.md) | | <p>Waits until a [target](./puppeteer.target.md) matching the given <code>predicate</code> appears and returns it.</p><p>This will look all open [browser contexts](./puppeteer.browsercontext.md).</p> |
|
||||||
| [wsEndpoint()](./puppeteer.browser.wsendpoint.md) | | <p>Gets the WebSocket URL to connect to this [browser](./puppeteer.browser.md).</p><p>This is usually used with [Puppeteer.connect()](./puppeteer.puppeteer.connect.md).</p><p>You can find the debugger URL (<code>webSocketDebuggerUrl</code>) from <code>http://${host}:${port}/json/version</code>.</p><p>See [browser endpoint](https://chromedevtools.github.io/devtools-protocol/#how-do-i-access-the-browser-target) for more information.</p> |
|
| [wsEndpoint()](./puppeteer.browser.wsendpoint.md) | | <p>Gets the WebSocket URL to connect to this [browser](./puppeteer.browser.md).</p><p>This is usually used with [Puppeteer.connect()](./puppeteer.puppeteer.connect.md).</p><p>You can find the debugger URL (<code>webSocketDebuggerUrl</code>) from <code>http://$\{host\}:$\{port\}/json/version</code>.</p><p>See [browser endpoint](https://chromedevtools.github.io/devtools-protocol/#how-do-i-access-the-browser-target) for more information.</p> |
|
||||||
|
@ -16,6 +16,6 @@ export interface CoverageEntry
|
|||||||
|
|
||||||
| Property | Modifiers | Type | Description | Default |
|
| Property | Modifiers | Type | Description | Default |
|
||||||
| -------- | --------- | -------------------------------------------- | --------------------------------------------- | ------- |
|
| -------- | --------- | -------------------------------------------- | --------------------------------------------- | ------- |
|
||||||
| ranges | | Array<{ start: number; end: number; }> | The covered range as start and end positions. | |
|
| ranges | | Array<\{ start: number; end: number; \}> | The covered range as start and end positions. | |
|
||||||
| text | | string | The content of the style sheet or script. | |
|
| text | | string | The content of the style sheet or script. | |
|
||||||
| url | | string | The URL of the style sheet or script. | |
|
| url | | string | The URL of the style sheet or script. | |
|
||||||
|
@ -16,7 +16,7 @@ class CSSCoverage {
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | -------------------------------- | ------------ |
|
| --------- | -------------------------------- | ------------ |
|
||||||
| options | { resetOnNavigation?: boolean; } | _(Optional)_ |
|
| options | \{ resetOnNavigation?: boolean; \} | _(Optional)_ |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class ElementHandle {
|
|||||||
| --------- | ------------------------------------------------------------ | ------------ |
|
| --------- | ------------------------------------------------------------ | ------------ |
|
||||||
| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | |
|
| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | |
|
||||||
| target | [ElementHandle](./puppeteer.elementhandle.md)<Node> | |
|
| target | [ElementHandle](./puppeteer.elementhandle.md)<Node> | |
|
||||||
| options | { delay: number; } | _(Optional)_ |
|
| options | \{ delay: number; \} | _(Optional)_ |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ class ElementHandle {
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
|
| --------- | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
|
||||||
| this | [ElementHandle](./puppeteer.elementhandle.md)<Element> | |
|
| 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. |
|
| options | \{ threshold?: number; \} | _(Optional)_ Threshold for the intersection between 0 (no intersection) and 1 (full intersection). Defaults to 1. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ class ElementHandle {
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | --------------------------------------------------------------------------------------------------- | ----------- |
|
| --------- | --------------------------------------------------------------------------------------------------- | ----------- |
|
||||||
| options | Readonly<[ScreenshotOptions](./puppeteer.screenshotoptions.md)> & { encoding: 'base64'; } | |
|
| options | Readonly<[ScreenshotOptions](./puppeteer.screenshotoptions.md)> & \{ encoding: 'base64'; \} | |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ class ElementHandle {
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
| --------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
||||||
| xpath | string | A [xpath](https://developer.mozilla.org/en-US/docs/Web/XPath) of an element to wait for |
|
| xpath | string | A [xpath](https://developer.mozilla.org/en-US/docs/Web/XPath) of an element to wait for |
|
||||||
| options | { visible?: boolean; hidden?: boolean; timeout?: number; } | _(Optional)_ Optional waiting parameters |
|
| options | \{ visible?: boolean; hidden?: boolean; timeout?: number; \} | _(Optional)_ Optional waiting parameters |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ class Frame {
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |
|
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |
|
||||||
| url | string | URL to navigate the frame to. The URL should include scheme, e.g. <code>https://</code> |
|
| url | string | URL to navigate the frame to. The URL should include scheme, e.g. <code>https://</code> |
|
||||||
| options | { referer?: string; referrerPolicy?: string; timeout?: number; waitUntil?: [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md) \| [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md)\[\]; } | _(Optional)_ Options to configure waiting behavior. |
|
| options | \{ referer?: string; referrerPolicy?: string; timeout?: number; waitUntil?: [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md) \| [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md)\[\]; \} | _(Optional)_ Options to configure waiting behavior. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ class Frame {
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| html | string | HTML markup to assign to the page. |
|
| html | string | HTML markup to assign to the page. |
|
||||||
| options | { timeout?: number; waitUntil?: [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md) \| [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md)\[\]; } | _(Optional)_ Options to configure how long before timing out and at what point to consider the content setting successful. |
|
| options | \{ timeout?: number; waitUntil?: [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md) \| [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md)\[\]; \} | _(Optional)_ Options to configure how long before timing out and at what point to consider the content setting successful. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ class HTTPRequest {
|
|||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
{ errorText: string; } \| null
|
\{ errorText: string; \} \| null
|
||||||
|
|
||||||
`null` unless the request failed. If the request fails this can return an object with `errorText` containing a human-readable error message, e.g. `net::ERR_FAILED`. It is not guaranteed that there will be failure text if the request fails.
|
`null` unless the request failed. If the request fails this can return an object with `errorText` containing a human-readable error message, e.g. `net::ERR_FAILED`. It is not guaranteed that there will be failure text if the request fails.
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ class JSCoverage {
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------ |
|
| --------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------ |
|
||||||
| options | { resetOnNavigation?: boolean; reportAnonymousScripts?: boolean; includeRawScriptCoverage?: boolean; useBlockCoverage?: boolean; } | _(Optional)_ |
|
| options | \{ resetOnNavigation?: boolean; reportAnonymousScripts?: boolean; includeRawScriptCoverage?: boolean; useBlockCoverage?: boolean; \} | _(Optional)_ |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class Mouse {
|
|||||||
| --------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| start | [Point](./puppeteer.point.md) | point to drag from |
|
| start | [Point](./puppeteer.point.md) | point to drag from |
|
||||||
| target | [Point](./puppeteer.point.md) | point to drop on |
|
| target | [Point](./puppeteer.point.md) | point to drop on |
|
||||||
| options | { delay?: number; } | _(Optional)_ An object of options. Accepts delay which, if specified, is the time to wait between <code>dragover</code> and <code>drop</code> in milliseconds. Defaults to 0. |
|
| options | \{ delay?: number; \} | _(Optional)_ An object of options. Accepts delay which, if specified, is the time to wait between <code>dragover</code> and <code>drop</code> in milliseconds. Defaults to 0. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ class Page {
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ------------------------------ | ------------ |
|
| --------- | ------------------------------ | ------------ |
|
||||||
| options | { runBeforeUnload?: boolean; } | _(Optional)_ |
|
| options | \{ runBeforeUnload?: boolean; \} | _(Optional)_ |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ class Page {
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ----------------------------------------------------- | --------------------------------------------------------------- |
|
| --------- | ----------------------------------------------------- | --------------------------------------------------------------- |
|
||||||
| overrides | { isUserActive: boolean; isScreenUnlocked: boolean; } | _(Optional)_ Mock idle state. If not set, clears idle overrides |
|
| overrides | \{ isUserActive: boolean; isScreenUnlocked: boolean; \} | _(Optional)_ Mock idle state. If not set, clears idle overrides |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ class Page {
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| ------------ | ---------------------------------- | -------------------------------------------------------------- |
|
| ------------ | ---------------------------------- | -------------------------------------------------------------- |
|
||||||
| name | string | Name of the function on the window object |
|
| name | string | Name of the function on the window object |
|
||||||
| pptrFunction | Function \| { default: Function; } | Callback function which will be called in Puppeteer's context. |
|
| pptrFunction | Function \| \{ default: Function; \} | Callback function which will be called in Puppeteer's context. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ class Page {
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | --------------------------------------------------------------------------------------------------- | ------------------------------- |
|
| --------- | --------------------------------------------------------------------------------------------------- | ------------------------------- |
|
||||||
| options | Readonly<[ScreenshotOptions](./puppeteer.screenshotoptions.md)> & { encoding: 'base64'; } | Configures screenshot behavior. |
|
| options | Readonly<[ScreenshotOptions](./puppeteer.screenshotoptions.md)> & \{ encoding: 'base64'; \} | Configures screenshot behavior. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ class Page {
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---------------------------------------- | ---------------------------------------- |
|
| --------- | ---------------------------------------- | ---------------------------------------- |
|
||||||
| options | { idleTime?: number; timeout?: number; } | _(Optional)_ Optional waiting parameters |
|
| options | \{ idleTime?: number; timeout?: number; \} | _(Optional)_ Optional waiting parameters |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ class Page {
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| -------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------- |
|
| -------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------- |
|
||||||
| urlOrPredicate | string \| ((req: [HTTPRequest](./puppeteer.httprequest.md)) => boolean \| Promise<boolean>) | A URL or predicate to wait for |
|
| urlOrPredicate | string \| ((req: [HTTPRequest](./puppeteer.httprequest.md)) => boolean \| Promise<boolean>) | A URL or predicate to wait for |
|
||||||
| options | { timeout?: number; } | _(Optional)_ Optional waiting parameters |
|
| options | \{ timeout?: number; \} | _(Optional)_ Optional waiting parameters |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ class Page {
|
|||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| -------------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------- |
|
| -------------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------- |
|
||||||
| urlOrPredicate | string \| ((res: [HTTPResponse](./puppeteer.httpresponse.md)) => boolean \| Promise<boolean>) | A URL or predicate to wait for. |
|
| urlOrPredicate | string \| ((res: [HTTPResponse](./puppeteer.httpresponse.md)) => boolean \| Promise<boolean>) | A URL or predicate to wait for. |
|
||||||
| options | { timeout?: number; } | _(Optional)_ Optional waiting parameters |
|
| options | \{ timeout?: number; \} | _(Optional)_ Optional waiting parameters |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ export interface PageEvents extends Record<EventType, unknown>
|
|||||||
| framedetached | | [Frame](./puppeteer.frame.md) | | |
|
| framedetached | | [Frame](./puppeteer.frame.md) | | |
|
||||||
| framenavigated | | [Frame](./puppeteer.frame.md) | | |
|
| framenavigated | | [Frame](./puppeteer.frame.md) | | |
|
||||||
| load | | undefined | | |
|
| load | | undefined | | |
|
||||||
| metrics | | { title: string; metrics: [Metrics](./puppeteer.metrics.md); } | | |
|
| metrics | | \{ title: string; metrics: [Metrics](./puppeteer.metrics.md); \} | | |
|
||||||
| pageerror | | Error | | |
|
| pageerror | | Error | | |
|
||||||
| popup | | [Page](./puppeteer.page.md) \| null | | |
|
| popup | | [Page](./puppeteer.page.md) \| null | | |
|
||||||
| request | | [HTTPRequest](./puppeteer.httprequest.md) | | |
|
| request | | [HTTPRequest](./puppeteer.httprequest.md) | | |
|
||||||
|
@ -16,6 +16,6 @@ export interface ScreencastOptions
|
|||||||
| ---------- | --------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- |
|
| ---------- | --------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- |
|
||||||
| crop | <code>optional</code> | [BoundingBox](./puppeteer.boundingbox.md) | Specifies the region of the viewport to crop. | |
|
| crop | <code>optional</code> | [BoundingBox](./puppeteer.boundingbox.md) | Specifies the region of the viewport to crop. | |
|
||||||
| ffmpegPath | <code>optional</code> | string | <p>Path to the \[ffmpeg\](https://ffmpeg.org/).</p><p>Required if <code>ffmpeg</code> is not in your PATH.</p> | |
|
| ffmpegPath | <code>optional</code> | string | <p>Path to the \[ffmpeg\](https://ffmpeg.org/).</p><p>Required if <code>ffmpeg</code> is not in your PATH.</p> | |
|
||||||
| path | <code>optional</code> | \`${string}.webm\` | File path to save the screencast to. | |
|
| path | <code>optional</code> | \`$\{string\}.webm\` | File path to save the screencast to. | |
|
||||||
| scale | <code>optional</code> | number | <p>Scales the output video.</p><p>For example, <code>0.5</code> will shrink the width and height of the output video by half. <code>2</code> will double the width and height of the output video.</p> | <code>1</code> |
|
| scale | <code>optional</code> | number | <p>Scales the output video.</p><p>For example, <code>0.5</code> will shrink the width and height of the output video by half. <code>2</code> will double the width and height of the output video.</p> | <code>1</code> |
|
||||||
| speed | <code>optional</code> | number | <p>Specifies the speed to record at.</p><p>For example, <code>0.5</code> will slowdown the output video by 50%. <code>2</code> will double the speed of the output video.</p> | <code>1</code> |
|
| speed | <code>optional</code> | number | <p>Specifies the speed to record at.</p><p>For example, <code>0.5</code> will slowdown the output video by 50%. <code>2</code> will double the speed of the output video.</p> | <code>1</code> |
|
||||||
|
@ -18,7 +18,7 @@ export declare function install(
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ----------------------------------------------------------------------- | ----------- |
|
| --------- | ----------------------------------------------------------------------- | ----------- |
|
||||||
| options | [InstallOptions](./browsers.installoptions.md) & { unpack?: true; } | |
|
| options | [InstallOptions](./browsers.installoptions.md) & \{ unpack?: true; \} | |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ export declare function install(
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ----------------------------------------------------------------------- | ----------- |
|
| --------- | ----------------------------------------------------------------------- | ----------- |
|
||||||
| options | [InstallOptions](./browsers.installoptions.md) & { unpack: false; } | |
|
| options | [InstallOptions](./browsers.installoptions.md) & \{ unpack: false; \} | |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ patches and contributions!
|
|||||||
Contributions to this project must be accompanied by a Contributor License
|
Contributions to this project must be accompanied by a Contributor License
|
||||||
Agreement. You (or your employer) retain the copyright to your contribution,
|
Agreement. You (or your employer) retain the copyright to your contribution,
|
||||||
this simply gives us permission to use and redistribute your contributions as
|
this simply gives us permission to use and redistribute your contributions as
|
||||||
part of the project. Head over to <https://cla.developers.google.com/> to see
|
part of the project. Head over to <[https://cla.developers.google.com/](https://cla.developers.google.com/)> to see
|
||||||
your current agreements on file or to sign a new one.
|
your current agreements on file or to sign a new one.
|
||||||
|
|
||||||
You generally only need to submit a CLA once, so if you've already submitted one
|
You generally only need to submit a CLA once, so if you've already submitted one
|
||||||
|
Loading…
Reference in New Issue
Block a user