diff --git a/docs/api/puppeteer.browserconnectoptions.md b/docs/api/puppeteer.browserconnectoptions.md index c8a53777..3e1a65b0 100644 --- a/docs/api/puppeteer.browserconnectoptions.md +++ b/docs/api/puppeteer.browserconnectoptions.md @@ -14,10 +14,10 @@ export interface BrowserConnectOptions ## Properties -| Property | Modifiers | Type | Description | Default | -| ----------------- | --------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ------- | -| defaultViewport | optional | [Viewport](./puppeteer.viewport.md) \| null | Sets the viewport for each page. | | -| ignoreHTTPSErrors | optional | boolean | Whether to ignore HTTPS errors during navigation. | false | -| protocolTimeout | optional | number | Timeout setting for individual protocol (CDP) calls. | 180000 | -| slowMo | optional | number | Slows down Puppeteer operations by the specified amount of milliseconds to aid debugging. | | -| targetFilter | optional | [TargetFilterCallback](./puppeteer.targetfiltercallback.md) | Callback to decide if Puppeteer should connect to a given target or not. | | +| Property | Modifiers | Type | Description | Default | +| ----------------- | --------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -------------------- | +| defaultViewport | optional | [Viewport](./puppeteer.viewport.md) \| null | Sets the viewport for each page. | | +| ignoreHTTPSErrors | optional | boolean | Whether to ignore HTTPS errors during navigation. | false | +| protocolTimeout | optional | number | Timeout setting for individual protocol (CDP) calls. | 180_000 | +| slowMo | optional | number | Slows down Puppeteer operations by the specified amount of milliseconds to aid debugging. | | +| targetFilter | optional | [TargetFilterCallback](./puppeteer.targetfiltercallback.md) | Callback to decide if Puppeteer should connect to a given target or not. | | diff --git a/docs/api/puppeteer.browserfetcheroptions.md b/docs/api/puppeteer.browserfetcheroptions.md index 70dace88..6d1c93fc 100644 --- a/docs/api/puppeteer.browserfetcheroptions.md +++ b/docs/api/puppeteer.browserfetcheroptions.md @@ -16,6 +16,6 @@ export interface BrowserFetcherOptions | ----------------- | --------------------- | ----------------------------------- | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- | | host | optional | string | Determines the host that will be used for downloading. |

Either

- https://storage.googleapis.com or - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central

| | path | | string | Determines the path to download browsers to. | | -| platform | optional | [Platform](./puppeteer.platform.md) | Determines which platform the browser will be suited for. | Auto-detected. | -| product | optional | 'chrome' \| 'firefox' | Determines which product the [BrowserFetcher](./puppeteer.browserfetcher.md) is for. | "chrome". | +| platform | optional | [Platform](./puppeteer.platform.md) | Determines which platform the browser will be suited for. | **Auto-detected.** | +| product | optional | 'chrome' \| 'firefox' | Determines which product the [BrowserFetcher](./puppeteer.browserfetcher.md) is for. | chrome | | useMacOSARMBinary | optional | boolean | Enables the use of the Chromium binary for macOS ARM. | | diff --git a/docs/api/puppeteer.browserlaunchargumentoptions.md b/docs/api/puppeteer.browserlaunchargumentoptions.md index e3540e73..1b161e8a 100644 --- a/docs/api/puppeteer.browserlaunchargumentoptions.md +++ b/docs/api/puppeteer.browserlaunchargumentoptions.md @@ -19,5 +19,5 @@ export interface BrowserLaunchArgumentOptions | args | optional | string\[\] | Additional command line arguments to pass to the browser instance. | | | debuggingPort | optional | number | | | | devtools | optional | boolean | Whether to auto-open a DevTools panel for each tab. If this is set to true, then headless will be forced to false. | false | -| headless | optional | boolean \| 'new' | Whether to run the browser in headless mode. | true | +| headless | optional | boolean \| 'new' | Whether to run the browser in headless mode. | true | | userDataDir | optional | string | Path to a user data directory. [see the Chromium docs](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/user_data_dir.md) for more info. | | diff --git a/docs/api/puppeteer.clickoptions.md b/docs/api/puppeteer.clickoptions.md index 16044dfe..3f866709 100644 --- a/docs/api/puppeteer.clickoptions.md +++ b/docs/api/puppeteer.clickoptions.md @@ -12,9 +12,9 @@ export interface ClickOptions ## Properties -| Property | Modifiers | Type | Description | Default | -| ---------- | --------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------- | ------- | -| button | optional | [MouseButton](./puppeteer.mousebutton.md) | | 'left' | -| clickCount | optional | number | | 1 | -| delay | optional | number | Time to wait between mousedown and mouseup in milliseconds. | 0 | -| offset | optional | [Offset](./puppeteer.offset.md) | Offset for the clickable point relative to the top-left corner of the border box. | | +| Property | Modifiers | Type | Description | Default | +| ---------- | --------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------- | -------------- | +| button | optional | [MouseButton](./puppeteer.mousebutton.md) | | 'left' | +| clickCount | optional | number | | 1 | +| delay | optional | number | Time to wait between mousedown and mouseup in milliseconds. | 0 | +| offset | optional | [Offset](./puppeteer.offset.md) | Offset for the clickable point relative to the top-left corner of the border box. | | diff --git a/docs/api/puppeteer.configuration.md b/docs/api/puppeteer.configuration.md index 220d4bd6..5f64f889 100644 --- a/docs/api/puppeteer.configuration.md +++ b/docs/api/puppeteer.configuration.md @@ -20,10 +20,10 @@ export interface Configuration | ------------------ | --------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | browserRevision | optional | string |

Specifies a certain version of the browser you'd like Puppeteer to use.

Can be overridden by PUPPETEER_BROWSER_REVISION.

See [puppeteer.launch](./puppeteer.puppeteernode.launch.md) on how executable path is inferred.

| A compatible-revision of the browser. | | cacheDirectory | optional | string |

Defines the directory to be used by Puppeteer for caching.

Can be overridden by PUPPETEER_CACHE_DIR.

| path.join(os.homedir(), '.cache', 'puppeteer') | -| defaultProduct | optional | [Product](./puppeteer.product.md) |

Specifies which browser you'd like Puppeteer to use.

Can be overridden by PUPPETEER_PRODUCT.

| 'chrome' | +| defaultProduct | optional | [Product](./puppeteer.product.md) |

Specifies which browser you'd like Puppeteer to use.

Can be overridden by PUPPETEER_PRODUCT.

| chrome | | downloadHost | optional | string |

Specifies the URL prefix that is used to download Chromium.

Can be overridden by PUPPETEER_DOWNLOAD_HOST.

| Either https://storage.googleapis.com or https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central, depending on the product. | | downloadPath | optional | string |

Specifies the path for the downloads folder.

Can be overridden by PUPPETEER_DOWNLOAD_PATH.

| <cache>/<product> where <cache> is Puppeteer's cache directory and <product> is the name of the browser. | -| executablePath | optional | string |

Specifies an executable path to be used in [puppeteer.launch](./puppeteer.puppeteernode.launch.md).

Can be overridden by PUPPETEER_EXECUTABLE_PATH.

| Auto-computed. | +| executablePath | optional | string |

Specifies an executable path to be used in [puppeteer.launch](./puppeteer.puppeteernode.launch.md).

Can be overridden by PUPPETEER_EXECUTABLE_PATH.

| **Auto-computed.** | | experiments | optional | [ExperimentsConfiguration](./puppeteer.experimentsconfiguration.md) | Defines experimental options for Puppeteer. | | | logLevel | optional | 'silent' \| 'error' \| 'warn' |

Tells Puppeteer to log at the given level.

At the moment, any option silences logging.

| undefined | | skipDownload | optional | boolean |

Tells Puppeteer to not download during installation.

Can be overridden by PUPPETEER_SKIP_DOWNLOAD.

| | diff --git a/docs/api/puppeteer.launchoptions.md b/docs/api/puppeteer.launchoptions.md index 09776b87..e6b28d35 100644 --- a/docs/api/puppeteer.launchoptions.md +++ b/docs/api/puppeteer.launchoptions.md @@ -17,15 +17,15 @@ export interface LaunchOptions | Property | Modifiers | Type | Description | Default | | ------------------ | --------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | | channel | optional | [ChromeReleaseChannel](./puppeteer.chromereleasechannel.md) | Chrome Release Channel | | -| dumpio | optional | boolean | If true, pipes the browser process stdout and stderr to process.stdout and process.stderr. | false | +| dumpio | optional | boolean | If true, pipes the browser process stdout and stderr to process.stdout and process.stderr. | false | | env | optional | Record<string, string \| undefined> | Specify environment variables that will be visible to the browser. | The contents of process.env. | | executablePath | optional | string | Path to a browser executable to use instead of the bundled Chromium. Note that Puppeteer is only guaranteed to work with the bundled Chromium, so use this setting at your own risk. | | | extraPrefsFirefox | optional | Record<string, unknown> | [Additional preferences](https://searchfox.org/mozilla-release/source/modules/libpref/init/all.js) that can be passed when launching with Firefox. | | | handleSIGHUP | optional | boolean | Close the browser process on SIGHUP. | true | | handleSIGINT | optional | boolean | Close the browser process on Ctrl+C. | true | | handleSIGTERM | optional | boolean | Close the browser process on SIGTERM. | true | -| ignoreDefaultArgs | optional | boolean \| string\[\] | If true, do not use puppeteer.defaultArgs() when creating a browser. If an array is provided, these args will be filtered out. Use this with care - you probably want the default arguments Puppeteer uses. | false | -| pipe | optional | boolean | Connect to a browser over a pipe instead of a WebSocket. | false | +| ignoreDefaultArgs | optional | boolean \| string\[\] | If true, do not use puppeteer.defaultArgs() when creating a browser. If an array is provided, these args will be filtered out. Use this with care - you probably want the default arguments Puppeteer uses. | false | +| pipe | optional | boolean | Connect to a browser over a pipe instead of a WebSocket. | false | | product | optional | [Product](./puppeteer.product.md) | Which browser to launch. | chrome | -| timeout | optional | number | Maximum time in milliseconds to wait for the browser to start. Pass 0 to disable the timeout. | 30000 (30 seconds). | -| waitForInitialPage | optional | boolean | Whether to wait for the initial page to be ready. Useful when a user explicitly disables that (e.g. --no-startup-window for Chrome). | true | +| timeout | optional | number | Maximum time in milliseconds to wait for the browser to start. Pass 0 to disable the timeout. | 30_000 (30 seconds). | +| waitForInitialPage | optional | boolean | Whether to wait for the initial page to be ready. Useful when a user explicitly disables that (e.g. --no-startup-window for Chrome). | true | diff --git a/docs/api/puppeteer.page.setcacheenabled.md b/docs/api/puppeteer.page.setcacheenabled.md index 9b799e82..4dfebde4 100644 --- a/docs/api/puppeteer.page.setcacheenabled.md +++ b/docs/api/puppeteer.page.setcacheenabled.md @@ -26,4 +26,4 @@ Promise<void> #### Default value: -true +`true` diff --git a/docs/api/puppeteer.pdfoptions.md b/docs/api/puppeteer.pdfoptions.md index 7cf87837..e764f614 100644 --- a/docs/api/puppeteer.pdfoptions.md +++ b/docs/api/puppeteer.pdfoptions.md @@ -14,20 +14,20 @@ export interface PDFOptions ## Properties -| Property | Modifiers | Type | Description | Default | -| ------------------- | --------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| displayHeaderFooter | optional | boolean | Whether to show the header and footer. | false | -| footerTemplate | optional | string | HTML template for the print footer. Has the same constraints and support for special classes as [PDFOptions.headerTemplate](./puppeteer.pdfoptions.md). | | -| format | optional | [PaperFormat](./puppeteer.paperformat.md) | | letter. | -| headerTemplate | optional | string |

HTML template for the print header. Should be valid HTML with the following classes used to inject values into them:

- date formatted print date

- title document title

- url document location

- pageNumber current page number

- totalPages total pages in the document

| | -| height | optional | string \| number | Sets the height of paper. You can pass in a number or a string with a unit. | | -| landscape | optional | boolean | Whether to print in landscape orientation. | = false | -| margin | optional | [PDFMargin](./puppeteer.pdfmargin.md) | Set the PDF margins. | no margins are set. | -| omitBackground | optional | boolean | Hides default white background and allows generating pdfs with transparency. | false | -| pageRanges | optional | string | Paper ranges to print, e.g. 1-5, 8, 11-13. | The empty string, which means all pages are printed. | -| path | optional | string | The path to save the file to. | the empty string, which means the PDF will not be written to disk. | -| preferCSSPageSize | optional | boolean | Give any CSS @page size declared in the page priority over what is declared in the width or height or format option. | false, which will scale the content to fit the paper size. | -| printBackground | optional | boolean | Set to true to print background graphics. | false | -| scale | optional | number | Scales the rendering of the web page. Amount must be between 0.1 and 2. | 1 | -| timeout | optional | number | Timeout in milliseconds. Pass 0 to disable timeout. | 30000 | -| width | optional | string \| number | Sets the width of paper. You can pass in a number or a string with a unit. | | +| Property | Modifiers | Type | Description | Default | +| ------------------- | --------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | +| displayHeaderFooter | optional | boolean | Whether to show the header and footer. | false | +| footerTemplate | optional | string | HTML template for the print footer. Has the same constraints and support for special classes as [PDFOptions.headerTemplate](./puppeteer.pdfoptions.md). | | +| format | optional | [PaperFormat](./puppeteer.paperformat.md) | | letter. | +| headerTemplate | optional | string |

HTML template for the print header. Should be valid HTML with the following classes used to inject values into them:

- date formatted print date

- title document title

- url document location

- pageNumber current page number

- totalPages total pages in the document

| | +| height | optional | string \| number | Sets the height of paper. You can pass in a number or a string with a unit. | | +| landscape | optional | boolean | Whether to print in landscape orientation. | false | +| margin | optional | [PDFMargin](./puppeteer.pdfmargin.md) | Set the PDF margins. | undefined no margins are set. | +| omitBackground | optional | boolean | Hides default white background and allows generating pdfs with transparency. | false | +| pageRanges | optional | string | Paper ranges to print, e.g. 1-5, 8, 11-13. | The empty string, which means all pages are printed. | +| path | optional | string | The path to save the file to. | undefined, which means the PDF will not be written to disk. | +| preferCSSPageSize | optional | boolean | Give any CSS @page size declared in the page priority over what is declared in the width or height or format option. | false, which will scale the content to fit the paper size. | +| printBackground | optional | boolean | Set to true to print background graphics. | false | +| scale | optional | number | Scales the rendering of the web page. Amount must be between 0.1 and 2. | 1 | +| timeout | optional | number | Timeout in milliseconds. Pass 0 to disable timeout. | 30_000 | +| width | optional | string \| number | Sets the width of paper. You can pass in a number or a string with a unit. | | diff --git a/docs/api/puppeteer.screenshotclip.md b/docs/api/puppeteer.screenshotclip.md index 49e112f7..5ab8be38 100644 --- a/docs/api/puppeteer.screenshotclip.md +++ b/docs/api/puppeteer.screenshotclip.md @@ -12,10 +12,10 @@ export interface ScreenshotClip ## Properties -| Property | Modifiers | Type | Description | Default | -| -------- | --------------------- | ------ | ----------- | ------- | -| height | | number | | | -| scale | optional | number | | 1 | -| width | | number | | | -| x | | number | | | -| y | | number | | | +| Property | Modifiers | Type | Description | Default | +| -------- | --------------------- | ------ | ----------- | -------------- | +| height | | number | | | +| scale | optional | number | | 1 | +| width | | number | | | +| x | | number | | | +| y | | number | | | diff --git a/docs/api/puppeteer.snapshotoptions.md b/docs/api/puppeteer.snapshotoptions.md index f9625d24..45afea40 100644 --- a/docs/api/puppeteer.snapshotoptions.md +++ b/docs/api/puppeteer.snapshotoptions.md @@ -14,5 +14,5 @@ export interface SnapshotOptions | Property | Modifiers | Type | Description | Default | | --------------- | --------------------- | --------------------------------------------------------- | ------------------------------------------- | --------------------------------- | -| interestingOnly | optional | boolean | Prune uninteresting nodes from the tree. | true | +| interestingOnly | optional | boolean | Prune uninteresting nodes from the tree. | true | | root | optional | [ElementHandle](./puppeteer.elementhandle.md)<Node> | Root node to get the accessibility tree for | The root node of the entire page. | diff --git a/docs/api/puppeteer.viewport.md b/docs/api/puppeteer.viewport.md index 456993bb..5fa1f4d2 100644 --- a/docs/api/puppeteer.viewport.md +++ b/docs/api/puppeteer.viewport.md @@ -14,11 +14,11 @@ export interface Viewport ## Properties -| Property | Modifiers | Type | Description | Default | -| ----------------- | --------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| deviceScaleFactor | optional | number | Specify device scale factor. See [devicePixelRatio](https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio) for more info. | 1 | -| hasTouch | optional | boolean | Specify if the viewport supports touch events. | false | -| height | | number | The page height in pixels. | | -| isLandscape | optional | boolean | Specifies if the viewport is in landscape mode. | false | -| isMobile | optional | boolean | Whether the meta viewport tag is taken into account. | false | -| width | | number | The page width in pixels. | | +| Property | Modifiers | Type | Description | Default | +| ----------------- | --------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | +| deviceScaleFactor | optional | number | Specify device scale factor. See [devicePixelRatio](https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio) for more info. | 1 | +| hasTouch | optional | boolean | Specify if the viewport supports touch events. | false | +| height | | number | The page height in pixels. | | +| isLandscape | optional | boolean | Specifies if the viewport is in landscape mode. | false | +| isMobile | optional | boolean | Whether the meta viewport tag is taken into account. | false | +| width | | number | The page width in pixels. | | diff --git a/docs/api/puppeteer.waitforselectoroptions.md b/docs/api/puppeteer.waitforselectoroptions.md index 0dd59b7e..59757785 100644 --- a/docs/api/puppeteer.waitforselectoroptions.md +++ b/docs/api/puppeteer.waitforselectoroptions.md @@ -12,8 +12,8 @@ export interface WaitForSelectorOptions ## Properties -| Property | Modifiers | Type | Description | Default | -| -------- | --------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------- | -| hidden | optional | boolean | Wait for the selected element to not be found in the DOM or to be hidden, i.e. have display: none or visibility: hidden CSS properties. | false | -| timeout | optional | number |

Maximum time to wait in milliseconds. Pass 0 to disable timeout.

The default value can be changed by using [Page.setDefaultTimeout()](./puppeteer.page.setdefaulttimeout.md)

| 30000 (30 seconds) | -| visible | optional | boolean | Wait for the selected element to be present in DOM and to be visible, i.e. to not have display: none or visibility: hidden CSS properties. | false | +| Property | Modifiers | Type | Description | Default | +| -------- | --------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------- | +| hidden | optional | boolean | Wait for the selected element to not be found in the DOM or to be hidden, i.e. have display: none or visibility: hidden CSS properties. | false | +| timeout | optional | number |

Maximum time to wait in milliseconds. Pass 0 to disable timeout.

The default value can be changed by using [Page.setDefaultTimeout()](./puppeteer.page.setdefaulttimeout.md)

| 30_000 (30 seconds) | +| visible | optional | boolean | Wait for the selected element to be present in DOM and to be visible, i.e. to not have display: none or visibility: hidden CSS properties. | false | diff --git a/docs/api/puppeteer.waitfortargetoptions.md b/docs/api/puppeteer.waitfortargetoptions.md index d393cf35..b1787356 100644 --- a/docs/api/puppeteer.waitfortargetoptions.md +++ b/docs/api/puppeteer.waitfortargetoptions.md @@ -12,6 +12,6 @@ export interface WaitForTargetOptions ## Properties -| Property | Modifiers | Type | Description | Default | -| -------- | --------------------- | ------ | ------------------------------------------------------------------------------ | ----------- | -| timeout | optional | number | Maximum wait time in milliseconds. Pass 0 to disable the timeout. | 30 seconds. | +| Property | Modifiers | Type | Description | Default | +| -------- | --------------------- | ------ | ------------------------------------------------------------------------------ | ------------------- | +| timeout | optional | number | Maximum wait time in milliseconds. Pass 0 to disable the timeout. | 30_000 | diff --git a/packages/browsers/src/fetch.ts b/packages/browsers/src/fetch.ts index 25690b16..3189ea48 100644 --- a/packages/browsers/src/fetch.ts +++ b/packages/browsers/src/fetch.ts @@ -44,7 +44,7 @@ export interface Options { /** * Determines which platform the browser will be suited for. * - * @defaultValue Auto-detected. + * @defaultValue **Auto-detected.** */ platform?: BrowserPlatform; /** diff --git a/packages/browsers/src/launcher.ts b/packages/browsers/src/launcher.ts index 07745925..ae5998af 100644 --- a/packages/browsers/src/launcher.ts +++ b/packages/browsers/src/launcher.ts @@ -44,7 +44,7 @@ export interface Options { /** * Determines which platform the browser will be suited for. * - * @defaultValue Auto-detected. + * @defaultValue **Auto-detected.** */ platform?: BrowserPlatform; /** @@ -83,7 +83,7 @@ export interface SystemOptions { /** * Determines which platform the browser will be suited for. * - * @defaultValue Auto-detected. + * @defaultValue **Auto-detected.** */ platform?: BrowserPlatform; /** diff --git a/packages/puppeteer-core/src/api/Browser.ts b/packages/puppeteer-core/src/api/Browser.ts index 23eede0d..ccf364d9 100644 --- a/packages/puppeteer-core/src/api/Browser.ts +++ b/packages/puppeteer-core/src/api/Browser.ts @@ -119,7 +119,7 @@ export type Permission = export interface WaitForTargetOptions { /** * Maximum wait time in milliseconds. Pass `0` to disable the timeout. - * @defaultValue 30 seconds. + * @defaultValue `30_000` */ timeout?: number; } diff --git a/packages/puppeteer-core/src/api/ElementHandle.ts b/packages/puppeteer-core/src/api/ElementHandle.ts index d21d8d2c..9d151a10 100644 --- a/packages/puppeteer-core/src/api/ElementHandle.ts +++ b/packages/puppeteer-core/src/api/ElementHandle.ts @@ -80,7 +80,7 @@ export interface ClickOptions { /** * Time to wait between `mousedown` and `mouseup` in milliseconds. * - * @defaultValue 0 + * @defaultValue `0` */ delay?: number; /** @@ -88,7 +88,7 @@ export interface ClickOptions { */ button?: MouseButton; /** - * @defaultValue 1 + * @defaultValue `1` */ clickCount?: number; /** diff --git a/packages/puppeteer-core/src/api/Page.ts b/packages/puppeteer-core/src/api/Page.ts index ff75a298..9d8f5549 100644 --- a/packages/puppeteer-core/src/api/Page.ts +++ b/packages/puppeteer-core/src/api/Page.ts @@ -153,7 +153,7 @@ export interface ScreenshotClip { width: number; height: number; /** - * @defaultValue 1 + * @defaultValue `1` */ scale?: number; } @@ -2090,7 +2090,7 @@ export class Page extends EventEmitter { * Toggles ignoring cache for each request based on the enabled state. By * default, caching is enabled. * @param enabled - sets the `enabled` state of cache - * @defaultValue true + * @defaultValue `true` */ async setCacheEnabled(enabled?: boolean): Promise; async setCacheEnabled(): Promise { diff --git a/packages/puppeteer-core/src/common/Accessibility.ts b/packages/puppeteer-core/src/common/Accessibility.ts index 0a56b6a1..53fbb976 100644 --- a/packages/puppeteer-core/src/common/Accessibility.ts +++ b/packages/puppeteer-core/src/common/Accessibility.ts @@ -99,7 +99,7 @@ export interface SerializedAXNode { export interface SnapshotOptions { /** * Prune uninteresting nodes from the tree. - * @defaultValue true + * @defaultValue `true` */ interestingOnly?: boolean; /** diff --git a/packages/puppeteer-core/src/common/BrowserConnector.ts b/packages/puppeteer-core/src/common/BrowserConnector.ts index b571c9de..c9916a85 100644 --- a/packages/puppeteer-core/src/common/BrowserConnector.ts +++ b/packages/puppeteer-core/src/common/BrowserConnector.ts @@ -34,7 +34,7 @@ import {debugError} from './util.js'; export interface BrowserConnectOptions { /** * Whether to ignore HTTPS errors during navigation. - * @defaultValue false + * @defaultValue `false` */ ignoreHTTPSErrors?: boolean; /** @@ -62,7 +62,7 @@ export interface BrowserConnectOptions { /** * Timeout setting for individual protocol (CDP) calls. * - * @defaultValue 180000 + * @defaultValue `180_000` */ protocolTimeout?: number; } diff --git a/packages/puppeteer-core/src/common/Configuration.ts b/packages/puppeteer-core/src/common/Configuration.ts index 14f59925..e17c1503 100644 --- a/packages/puppeteer-core/src/common/Configuration.ts +++ b/packages/puppeteer-core/src/common/Configuration.ts @@ -95,7 +95,7 @@ export interface Configuration { * * Can be overridden by `PUPPETEER_EXECUTABLE_PATH`. * - * @defaultValue Auto-computed. + * @defaultValue **Auto-computed.** */ executablePath?: string; /** @@ -103,7 +103,7 @@ export interface Configuration { * * Can be overridden by `PUPPETEER_PRODUCT`. * - * @defaultValue `'chrome'` + * @defaultValue `chrome` */ defaultProduct?: Product; /** diff --git a/packages/puppeteer-core/src/common/IsolatedWorld.ts b/packages/puppeteer-core/src/common/IsolatedWorld.ts index a74f5fd3..9b1bda7e 100644 --- a/packages/puppeteer-core/src/common/IsolatedWorld.ts +++ b/packages/puppeteer-core/src/common/IsolatedWorld.ts @@ -69,7 +69,7 @@ export interface WaitForSelectorOptions { * * The default value can be changed by using {@link Page.setDefaultTimeout} * - * @defaultValue `30000` (30 seconds) + * @defaultValue `30_000` (30 seconds) */ timeout?: number; } diff --git a/packages/puppeteer-core/src/common/PDFOptions.ts b/packages/puppeteer-core/src/common/PDFOptions.ts index 3e169852..7b9eed78 100644 --- a/packages/puppeteer-core/src/common/PDFOptions.ts +++ b/packages/puppeteer-core/src/common/PDFOptions.ts @@ -83,12 +83,12 @@ export type PaperFormat = export interface PDFOptions { /** * Scales the rendering of the web page. Amount must be between `0.1` and `2`. - * @defaultValue 1 + * @defaultValue `1` */ scale?: number; /** * Whether to show the header and footer. - * @defaultValue false + * @defaultValue `false` */ displayHeaderFooter?: boolean; /** @@ -113,12 +113,12 @@ export interface PDFOptions { footerTemplate?: string; /** * Set to `true` to print background graphics. - * @defaultValue false + * @defaultValue `false` */ printBackground?: boolean; /** * Whether to print in landscape orientation. - * @defaultValue = false + * @defaultValue `false` */ landscape?: boolean; /** @@ -148,7 +148,7 @@ export interface PDFOptions { preferCSSPageSize?: boolean; /** * Set the PDF margins. - * @defaultValue no margins are set. + * @defaultValue `undefined` no margins are set. */ margin?: PDFMargin; /** @@ -158,17 +158,17 @@ export interface PDFOptions { * * If the path is relative, it's resolved relative to the current working directory. * - * @defaultValue the empty string, which means the PDF will not be written to disk. + * @defaultValue `undefined`, which means the PDF will not be written to disk. */ path?: string; /** * Hides default white background and allows generating pdfs with transparency. - * @defaultValue false + * @defaultValue `false` */ omitBackground?: boolean; /** * Timeout in milliseconds. Pass `0` to disable timeout. - * @defaultValue 30000 + * @defaultValue `30_000` */ timeout?: number; } diff --git a/packages/puppeteer-core/src/common/PuppeteerViewport.ts b/packages/puppeteer-core/src/common/PuppeteerViewport.ts index a0221ea6..953b327c 100644 --- a/packages/puppeteer-core/src/common/PuppeteerViewport.ts +++ b/packages/puppeteer-core/src/common/PuppeteerViewport.ts @@ -34,22 +34,22 @@ export interface Viewport { * @remarks * Setting this value to `0` will set the deviceScaleFactor to the system default. * - * @defaultValue 1 + * @defaultValue `1` */ deviceScaleFactor?: number; /** * Whether the `meta viewport` tag is taken into account. - * @defaultValue false + * @defaultValue `false` */ isMobile?: boolean; /** * Specifies if the viewport is in landscape mode. - * @defaultValue false + * @defaultValue `false` */ isLandscape?: boolean; /** * Specify if the viewport supports touch events. - * @defaultValue false + * @defaultValue `false` */ hasTouch?: boolean; } diff --git a/packages/puppeteer-core/src/node/BrowserFetcher.ts b/packages/puppeteer-core/src/node/BrowserFetcher.ts index 8ac4edeb..d7ef162d 100644 --- a/packages/puppeteer-core/src/node/BrowserFetcher.ts +++ b/packages/puppeteer-core/src/node/BrowserFetcher.ts @@ -143,13 +143,13 @@ export interface BrowserFetcherOptions { /** * Determines which platform the browser will be suited for. * - * @defaultValue Auto-detected. + * @defaultValue **Auto-detected.** */ platform?: Platform; /** * Determines which product the {@link BrowserFetcher} is for. * - * @defaultValue `"chrome"`. + * @defaultValue `chrome` */ product?: 'chrome' | 'firefox'; /** diff --git a/packages/puppeteer-core/src/node/LaunchOptions.ts b/packages/puppeteer-core/src/node/LaunchOptions.ts index af7847a6..5351a517 100644 --- a/packages/puppeteer-core/src/node/LaunchOptions.ts +++ b/packages/puppeteer-core/src/node/LaunchOptions.ts @@ -25,7 +25,7 @@ import {Product} from '../common/Product.js'; export interface BrowserLaunchArgumentOptions { /** * Whether to run the browser in headless mode. - * @defaultValue true + * @defaultValue `true` */ headless?: boolean | 'new'; /** @@ -77,7 +77,7 @@ export interface LaunchOptions { * If `true`, do not use `puppeteer.defaultArgs()` when creating a browser. If * an array is provided, these args will be filtered out. Use this with care - * you probably want the default arguments Puppeteer uses. - * @defaultValue false + * @defaultValue `false` */ ignoreDefaultArgs?: boolean | string[]; /** @@ -98,13 +98,13 @@ export interface LaunchOptions { /** * Maximum time in milliseconds to wait for the browser to start. * Pass `0` to disable the timeout. - * @defaultValue 30000 (30 seconds). + * @defaultValue `30_000` (30 seconds). */ timeout?: number; /** * If true, pipes the browser process stdout and stderr to `process.stdout` * and `process.stderr`. - * @defaultValue false + * @defaultValue `false` */ dumpio?: boolean; /** @@ -114,7 +114,7 @@ export interface LaunchOptions { env?: Record; /** * Connect to a browser over a pipe instead of a WebSocket. - * @defaultValue false + * @defaultValue `false` */ pipe?: boolean; /** @@ -129,7 +129,7 @@ export interface LaunchOptions { /** * Whether to wait for the initial page to be ready. * Useful when a user explicitly disables that (e.g. `--no-startup-window` for Chrome). - * @defaultValue true + * @defaultValue `true` */ waitForInitialPage?: boolean; }