mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs: use code block for single values (#9936)
This commit is contained in:
@@ -44,7 +44,7 @@ export interface Options {
|
||||
/**
|
||||
* Determines which platform the browser will be suited for.
|
||||
*
|
||||
* @defaultValue Auto-detected.
|
||||
* @defaultValue **Auto-detected.**
|
||||
*/
|
||||
platform?: BrowserPlatform;
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
/**
|
||||
|
||||
@@ -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<void>;
|
||||
async setCacheEnabled(): Promise<void> {
|
||||
|
||||
@@ -99,7 +99,7 @@ export interface SerializedAXNode {
|
||||
export interface SnapshotOptions {
|
||||
/**
|
||||
* Prune uninteresting nodes from the tree.
|
||||
* @defaultValue true
|
||||
* @defaultValue `true`
|
||||
*/
|
||||
interestingOnly?: boolean;
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
/**
|
||||
|
||||
@@ -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<string, string | undefined>;
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user