docs: fix some api-extractor warnings (#9806)
This commit is contained in:
parent
bc1a04def8
commit
38d511b5c2
@ -69,7 +69,7 @@ The constructor for this class is marked as internal. Third-party code should no
|
|||||||
| [hover(this)](./puppeteer.elementhandle.hover.md) | | This method scrolls element into view if needed, and then uses [Page.mouse](./puppeteer.page.mouse.md) to hover over the center of the element. If the element is detached from DOM, the method throws an error. |
|
| [hover(this)](./puppeteer.elementhandle.hover.md) | | This method scrolls element into view if needed, and then uses [Page.mouse](./puppeteer.page.mouse.md) to hover over the center of the element. If the element is detached from DOM, the method throws an error. |
|
||||||
| [isIntersectingViewport(this, options)](./puppeteer.elementhandle.isintersectingviewport.md) | | Resolves to true if the element is visible in the current viewport. |
|
| [isIntersectingViewport(this, options)](./puppeteer.elementhandle.isintersectingviewport.md) | | Resolves to true if the element is visible in the current viewport. |
|
||||||
| [press(key, options)](./puppeteer.elementhandle.press.md) | | Focuses the element, and then uses [Keyboard.down()](./puppeteer.keyboard.down.md) and [Keyboard.up()](./puppeteer.keyboard.up.md). |
|
| [press(key, options)](./puppeteer.elementhandle.press.md) | | Focuses the element, and then uses [Keyboard.down()](./puppeteer.keyboard.down.md) and [Keyboard.up()](./puppeteer.keyboard.up.md). |
|
||||||
| [screenshot(this, options)](./puppeteer.elementhandle.screenshot.md) | | This method scrolls element into view if needed, and then uses to take a screenshot of the element. If the element is detached from DOM, the method throws an error. |
|
| [screenshot(this, options)](./puppeteer.elementhandle.screenshot.md) | | This method scrolls element into view if needed, and then uses [Page.screenshot()](./puppeteer.page.screenshot_2.md) to take a screenshot of the element. If the element is detached from DOM, the method throws an error. |
|
||||||
| [select(values)](./puppeteer.elementhandle.select.md) | | Triggers a <code>change</code> and <code>input</code> event once all the provided options have been selected. If there's no <code><select></code> element matching <code>selector</code>, the method throws an error. |
|
| [select(values)](./puppeteer.elementhandle.select.md) | | Triggers a <code>change</code> and <code>input</code> event once all the provided options have been selected. If there's no <code><select></code> element matching <code>selector</code>, the method throws an error. |
|
||||||
| [tap(this)](./puppeteer.elementhandle.tap.md) | | This method scrolls element into view if needed, and then uses [Touchscreen.tap()](./puppeteer.touchscreen.tap.md) to tap in the center of the element. If the element is detached from DOM, the method throws an error. |
|
| [tap(this)](./puppeteer.elementhandle.tap.md) | | This method scrolls element into view if needed, and then uses [Touchscreen.tap()](./puppeteer.touchscreen.tap.md) to tap in the center of the element. If the element is detached from DOM, the method throws an error. |
|
||||||
| [toElement(tagName)](./puppeteer.elementhandle.toelement.md) | | Converts the current handle to the given element type. |
|
| [toElement(tagName)](./puppeteer.elementhandle.toelement.md) | | Converts the current handle to the given element type. |
|
||||||
|
@ -4,7 +4,7 @@ sidebar_label: ElementHandle.screenshot
|
|||||||
|
|
||||||
# ElementHandle.screenshot() method
|
# ElementHandle.screenshot() method
|
||||||
|
|
||||||
This method scrolls element into view if needed, and then uses to take a screenshot of the element. If the element is detached from DOM, the method throws an error.
|
This method scrolls element into view if needed, and then uses [Page.screenshot()](./puppeteer.page.screenshot_2.md) to take a screenshot of the element. If the element is detached from DOM, the method throws an error.
|
||||||
|
|
||||||
#### Signature:
|
#### Signature:
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ sidebar_label: Page.addStyleTag
|
|||||||
|
|
||||||
Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a `<style type="text/css">` tag with the content.
|
Adds a `<link rel="stylesheet">` tag into the page with the desired URL or a `<style type="text/css">` tag with the content.
|
||||||
|
|
||||||
Shortcut for .
|
Shortcut for [page.mainFrame().addStyleTag(options)](./puppeteer.frame.addstyletag_1.md).
|
||||||
|
|
||||||
#### Signature:
|
#### Signature:
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ page.off('request', logRequest);
|
|||||||
| [$eval(selector, pageFunction, args)](./puppeteer.page._eval.md) | | This method runs <code>document.querySelector</code> within the page and passes the result as the first argument to the <code>pageFunction</code>. |
|
| [$eval(selector, pageFunction, args)](./puppeteer.page._eval.md) | | This method runs <code>document.querySelector</code> within the page and passes the result as the first argument to the <code>pageFunction</code>. |
|
||||||
| [$x(expression)](./puppeteer.page._x.md) | | The method evaluates the XPath expression relative to the page document as its context node. If there are no such elements, the method resolves to an empty array. |
|
| [$x(expression)](./puppeteer.page._x.md) | | The method evaluates the XPath expression relative to the page document as its context node. If there are no such elements, the method resolves to an empty array. |
|
||||||
| [addScriptTag(options)](./puppeteer.page.addscripttag.md) | | Adds a <code><script></code> tag into the page with the desired URL or content. |
|
| [addScriptTag(options)](./puppeteer.page.addscripttag.md) | | Adds a <code><script></code> tag into the page with the desired URL or content. |
|
||||||
| [addStyleTag(options)](./puppeteer.page.addstyletag.md) | | <p>Adds a <code><link rel="stylesheet"></code> tag into the page with the desired URL or a <code><style type="text/css"></code> tag with the content.</p><p>Shortcut for .</p> |
|
| [addStyleTag(options)](./puppeteer.page.addstyletag.md) | | <p>Adds a <code><link rel="stylesheet"></code> tag into the page with the desired URL or a <code><style type="text/css"></code> tag with the content.</p><p>Shortcut for [page.mainFrame().addStyleTag(options)](./puppeteer.frame.addstyletag_1.md).</p> |
|
||||||
| [addStyleTag(options)](./puppeteer.page.addstyletag_1.md) | | |
|
| [addStyleTag(options)](./puppeteer.page.addstyletag_1.md) | | |
|
||||||
| [addStyleTag(options)](./puppeteer.page.addstyletag_2.md) | | |
|
| [addStyleTag(options)](./puppeteer.page.addstyletag_2.md) | | |
|
||||||
| [authenticate(credentials)](./puppeteer.page.authenticate.md) | | Provide credentials for <code>HTTP authentication</code>. |
|
| [authenticate(credentials)](./puppeteer.page.authenticate.md) | | Provide credentials for <code>HTTP authentication</code>. |
|
||||||
|
@ -16,7 +16,7 @@ export declare class ProtocolError extends CustomError
|
|||||||
|
|
||||||
## Properties
|
## Properties
|
||||||
|
|
||||||
| Property | Modifiers | Type | Description |
|
| Property | Modifiers | Type | Description |
|
||||||
| --------------------------------------------------------------- | --------- | ------------------- | ----------- |
|
| --------------------------------------------------------------- | --------------------- | ------------------- | ----------- |
|
||||||
| [code](./puppeteer.protocolerror.code.md) | | number \| undefined | |
|
| [code](./puppeteer.protocolerror.code.md) | <code>readonly</code> | number \| undefined | |
|
||||||
| [originalMessage](./puppeteer.protocolerror.originalmessage.md) | | string | |
|
| [originalMessage](./puppeteer.protocolerror.originalmessage.md) | <code>readonly</code> | string | |
|
||||||
|
@ -799,7 +799,7 @@ export class ElementHandle<
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This method scrolls element into view if needed, and then uses
|
* This method scrolls element into view if needed, and then uses
|
||||||
* {@link Page.screenshot} to take a screenshot of the element.
|
* {@link Page.(screenshot:3) } to take a screenshot of the element.
|
||||||
* If the element is detached from DOM, the method throws an error.
|
* If the element is detached from DOM, the method throws an error.
|
||||||
*/
|
*/
|
||||||
async screenshot(
|
async screenshot(
|
||||||
|
@ -1121,7 +1121,7 @@ export class Page extends EventEmitter {
|
|||||||
* a `<style type="text/css">` tag with the content.
|
* a `<style type="text/css">` tag with the content.
|
||||||
*
|
*
|
||||||
* Shortcut for
|
* Shortcut for
|
||||||
* {@link Frame.addStyleTag | page.mainFrame().addStyleTag(options)}.
|
* {@link Frame.(addStyleTag:2) | page.mainFrame().addStyleTag(options)}.
|
||||||
*
|
*
|
||||||
* @returns An {@link ElementHandle | element handle} to the injected `<link>`
|
* @returns An {@link ElementHandle | element handle} to the injected `<link>`
|
||||||
* or `<style>` element.
|
* or `<style>` element.
|
||||||
|
@ -26,11 +26,11 @@ import {scriptInjector} from './ScriptInjector.js';
|
|||||||
*/
|
*/
|
||||||
export interface CustomQueryHandler {
|
export interface CustomQueryHandler {
|
||||||
/**
|
/**
|
||||||
* @returns A {@link Node} matching the given `selector` from {@link node}.
|
* @returns A {@link https://developer.mozilla.org/en-US/docs/Web/API/Node | Node} matching the given `selector` from {@link https://developer.mozilla.org/en-US/docs/Web/API/Node | node}.
|
||||||
*/
|
*/
|
||||||
queryOne?: (node: Node, selector: string) => Node | null;
|
queryOne?: (node: Node, selector: string) => Node | null;
|
||||||
/**
|
/**
|
||||||
* @returns Some {@link Node}s matching the given `selector` from {@link node}.
|
* @returns Some {@link https://developer.mozilla.org/en-US/docs/Web/API/Node | Nodes} matching the given `selector` from {@link https://developer.mozilla.org/en-US/docs/Web/API/Node | node}.
|
||||||
*/
|
*/
|
||||||
queryAll?: (node: Node, selector: string) => Iterable<Node>;
|
queryAll?: (node: Node, selector: string) => Iterable<Node>;
|
||||||
}
|
}
|
||||||
|
@ -51,26 +51,22 @@ export class ProtocolError extends CustomError {
|
|||||||
#code?: number;
|
#code?: number;
|
||||||
#originalMessage = '';
|
#originalMessage = '';
|
||||||
|
|
||||||
/**
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
set code(code: number | undefined) {
|
set code(code: number | undefined) {
|
||||||
this.#code = code;
|
this.#code = code;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
* @readonly
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
get code(): number | undefined {
|
get code(): number | undefined {
|
||||||
return this.#code;
|
return this.#code;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
set originalMessage(originalMessage: string) {
|
set originalMessage(originalMessage: string) {
|
||||||
this.#originalMessage = originalMessage;
|
this.#originalMessage = originalMessage;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
* @readonly
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
get originalMessage(): string {
|
get originalMessage(): string {
|
||||||
|
@ -67,26 +67,11 @@ const SOURCE_URL_REGEX = /^[\040\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$/m;
|
|||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
export class ExecutionContext {
|
export class ExecutionContext {
|
||||||
/**
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
_client: CDPSession;
|
_client: CDPSession;
|
||||||
/**
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
_world?: IsolatedWorld;
|
_world?: IsolatedWorld;
|
||||||
/**
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
_contextId: number;
|
_contextId: number;
|
||||||
/**
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
_contextName?: string;
|
_contextName?: string;
|
||||||
|
|
||||||
/**
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
constructor(
|
constructor(
|
||||||
client: CDPSession,
|
client: CDPSession,
|
||||||
contextPayload: Protocol.Runtime.ExecutionContextDescription,
|
contextPayload: Protocol.Runtime.ExecutionContextDescription,
|
||||||
|
@ -68,6 +68,9 @@ export const NetworkManagerEmittedEvents = {
|
|||||||
RequestFinished: Symbol('NetworkManager.RequestFinished'),
|
RequestFinished: Symbol('NetworkManager.RequestFinished'),
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
interface FrameManager {
|
interface FrameManager {
|
||||||
frame(frameId: string): Frame | null;
|
frame(frameId: string): Frame | null;
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ export class QueryHandler {
|
|||||||
/**
|
/**
|
||||||
* Queries for multiple nodes given a selector and {@link ElementHandle}.
|
* Queries for multiple nodes given a selector and {@link ElementHandle}.
|
||||||
*
|
*
|
||||||
* Akin to {@link Document.prototype.querySelectorAll}.
|
* Akin to {@link https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll | Document.querySelectorAll()}.
|
||||||
*/
|
*/
|
||||||
static async *queryAll(
|
static async *queryAll(
|
||||||
element: ElementHandle<Node>,
|
element: ElementHandle<Node>,
|
||||||
@ -123,7 +123,7 @@ export class QueryHandler {
|
|||||||
/**
|
/**
|
||||||
* Queries for a single node given a selector and {@link ElementHandle}.
|
* Queries for a single node given a selector and {@link ElementHandle}.
|
||||||
*
|
*
|
||||||
* Akin to {@link Document.prototype.querySelector}.
|
* Akin to {@link https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector}.
|
||||||
*/
|
*/
|
||||||
static async queryOne(
|
static async queryOne(
|
||||||
element: ElementHandle<Node>,
|
element: ElementHandle<Node>,
|
||||||
|
@ -69,3 +69,4 @@ export * from './USKeyboardLayout.js';
|
|||||||
export * from './util.js';
|
export * from './util.js';
|
||||||
export * from './WaitTask.js';
|
export * from './WaitTask.js';
|
||||||
export * from './WebWorker.js';
|
export * from './WebWorker.js';
|
||||||
|
export * from './QueryHandler.js';
|
||||||
|
@ -247,6 +247,9 @@ export class BrowserRunner {
|
|||||||
removeEventListeners(this.#listeners);
|
removeEventListeners(this.#listeners);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
async setupWebDriverBiDiConnection(options: {
|
async setupWebDriverBiDiConnection(options: {
|
||||||
timeout: number;
|
timeout: number;
|
||||||
slowMo: number;
|
slowMo: number;
|
||||||
|
@ -126,7 +126,7 @@ export class FirefoxLauncher extends ProductLauncher {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (protocol === 'webDriverBiDi') {
|
if (protocol === 'webDriverBiDi') {
|
||||||
let browser;
|
let browser: Browser;
|
||||||
try {
|
try {
|
||||||
const connection = await runner.setupWebDriverBiDiConnection({
|
const connection = await runner.setupWebDriverBiDiConnection({
|
||||||
timeout,
|
timeout,
|
||||||
|
@ -37,10 +37,25 @@ const puppeteer = new PuppeteerNode({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const {
|
export const {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
connect,
|
connect,
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
createBrowserFetcher,
|
createBrowserFetcher,
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
defaultArgs,
|
defaultArgs,
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
executablePath,
|
executablePath,
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
launch,
|
launch,
|
||||||
} = puppeteer;
|
} = puppeteer;
|
||||||
|
|
||||||
|
@ -33,10 +33,25 @@ const puppeteer = new PuppeteerNode({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const {
|
export const {
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
connect,
|
connect,
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
createBrowserFetcher,
|
createBrowserFetcher,
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
defaultArgs,
|
defaultArgs,
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
executablePath,
|
executablePath,
|
||||||
|
/**
|
||||||
|
* @public
|
||||||
|
*/
|
||||||
launch,
|
launch,
|
||||||
} = puppeteer;
|
} = puppeteer;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user