chore: documentation improvements

This commit is contained in:
TASNEEM KOUSHAR 2021-07-09 13:42:01 +05:30 committed by GitHub
parent ea3df80ed1
commit d541e975ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 27 deletions

View File

@ -48,7 +48,7 @@ export const ConnectionEmittedEvents = {
} as const; } as const;
/** /**
* @internal * @public
*/ */
export class Connection extends EventEmitter { export class Connection extends EventEmitter {
_url: string; _url: string;

View File

@ -840,7 +840,7 @@ export class Page extends EventEmitter {
* @param enabled - Whether to enable drag interception. * @param enabled - Whether to enable drag interception.
* *
* @remarks * @remarks
* Activating drag interception enables the {@link Input.drag}, * Activating drag interception enables the `Input.drag`,
* methods This provides the capability to capture drag events emitted * methods This provides the capability to capture drag events emitted
* on the page, which can then be used to simulate drag-and-drop. * on the page, which can then be used to simulate drag-and-drop.
*/ */
@ -1407,32 +1407,33 @@ export class Page extends EventEmitter {
/** /**
* @returns Object containing metrics as key/value pairs. * @returns Object containing metrics as key/value pairs.
* *
* - `Timestamp` : <number> The timestamp when the metrics sample was taken. * - `Timestamp` : The timestamp when the metrics sample was taken.
* *
* - `Documents` : <number> Number of documents in the page. * - `Documents` : Number of documents in the page.
* *
* - `Frames` : <number> Number of frames in the page. * - `Frames` : Number of frames in the page.
* *
* - `JSEventListeners` : <number> Number of events in the page. * - `JSEventListeners` : Number of events in the page.
* *
* - `Nodes` : <number> Number of DOM nodes in the page. * - `Nodes` : Number of DOM nodes in the page.
* *
* - `LayoutCount` : <number> Total number of full or partial page layout. * - `LayoutCount` : Total number of full or partial page layout.
* *
* - `RecalcStyleCount` : <number> Total number of page style recalculations. * - `RecalcStyleCount` : Total number of page style recalculations.
* *
* - `LayoutDuration` : <number> Combined durations of all page layouts. * - `LayoutDuration` : Combined durations of all page layouts.
* *
* - `RecalcStyleDuration` : <number> Combined duration of all page style * - `RecalcStyleDuration` : Combined duration of all page style
* recalculations. * recalculations.
* *
* - `ScriptDuration` : <number> Combined duration of JavaScript execution. * - `ScriptDuration` : Combined duration of JavaScript execution.
* *
* - `TaskDuration` : <number> Combined duration of all tasks performed by the browser. * - `TaskDuration` : Combined duration of all tasks performed by the browser.
* *
* - `JSHeapUsedSize` : <number> Used JavaScript heap size.
* *
* - `JSHeapTotalSize` : <number> Total JavaScript heap size. * - `JSHeapUsedSize` : Used JavaScript heap size.
*
* - `JSHeapTotalSize` : Total JavaScript heap size.
* @remarks * @remarks
* NOTE: All timestamps are in monotonic time: monotonically increasing time * NOTE: All timestamps are in monotonic time: monotonically increasing time
* in seconds since an arbitrary point in the past. * in seconds since an arbitrary point in the past.
@ -2430,33 +2431,33 @@ export class Page extends EventEmitter {
* @remarks * @remarks
* Options object which might have the following properties: * Options object which might have the following properties:
* *
* - `path` : <string> The file path to save the image to. The screenshot type * - `path` : The file path to save the image to. The screenshot type
* will be inferred from file extension. If `path` is a relative path, then * will be inferred from file extension. If `path` is a relative path, then
* it is resolved relative to * it is resolved relative to
* {@link https://nodejs.org/api/process.html#process_process_cwd * {@link https://nodejs.org/api/process.html#process_process_cwd
* | current working directory}. * | current working directory}.
* If no path is provided, the image won't be saved to the disk. * If no path is provided, the image won't be saved to the disk.
* *
* - `type` : <string> Specify screenshot type, can be either `jpeg` or `png`. * - `type` : Specify screenshot type, can be either `jpeg` or `png`.
* Defaults to 'png'. * Defaults to 'png'.
* *
* - `quality` : <number> The quality of the image, between 0-100. Not * - `quality` : The quality of the image, between 0-100. Not
* applicable to `png` images. * applicable to `png` images.
* *
* - `fullPage` : <boolean> When true, takes a screenshot of the full * - `fullPage` : When true, takes a screenshot of the full
* scrollable page. Defaults to `false` * scrollable page. Defaults to `false`
* *
* - `clip` : <Object> An object which specifies clipping region of the page. * - `clip` : An object which specifies clipping region of the page.
* Should have the following fields:<br/> * Should have the following fields:<br/>
* - `x` : <number> x-coordinate of top-left corner of clip area.<br/> * - `x` : x-coordinate of top-left corner of clip area.<br/>
* - `y` : <number> y-coordinate of top-left corner of clip area.<br/> * - `y` : y-coordinate of top-left corner of clip area.<br/>
* - `width` : <number> width of clipping area.<br/> * - `width` : width of clipping area.<br/>
* - `height` : <number> height of clipping area. * - `height` : height of clipping area.
* *
* - `omitBackground` : <boolean> Hides default white background and allows * - `omitBackground` : Hides default white background and allows
* capturing screenshots with transparency. Defaults to `false` * capturing screenshots with transparency. Defaults to `false`
* *
* - `encoding` : <string> The encoding of the image, can be either base64 or * - `encoding` : The encoding of the image, can be either base64 or
* binary. Defaults to `binary`. * binary. Defaults to `binary`.
* *
* *