diff --git a/docs/api/puppeteer.frame.goto.md b/docs/api/puppeteer.frame.goto.md index a70c832a4c4..d38f09c4b0f 100644 --- a/docs/api/puppeteer.frame.goto.md +++ b/docs/api/puppeteer.frame.goto.md @@ -12,22 +12,17 @@ Navigates the frame to the given `url`. class Frame { abstract goto( url: string, - options?: { - referer?: string; - referrerPolicy?: string; - timeout?: number; - waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[]; - } + options?: GoToOptions ): Promise; } ``` ## Parameters -| Parameter | Type | Description | -| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| url | string | URL to navigate the frame to. The URL should include scheme, e.g. https:// | -| options | { referer?: string; referrerPolicy?: string; timeout?: number; waitUntil?: [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md) \| [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md)\[\]; } | _(Optional)_ Options to configure waiting behavior. | +| Parameter | Type | Description | +| --------- | ----------------------------------------- | --------------------------------------------------------------------------------------- | +| url | string | URL to navigate the frame to. The URL should include scheme, e.g. https:// | +| options | [GoToOptions](./puppeteer.gotooptions.md) | _(Optional)_ Options to configure waiting behavior. | **Returns:** diff --git a/docs/api/puppeteer.frame.setcontent.md b/docs/api/puppeteer.frame.setcontent.md index 8e4ad05db45..e4d73a1fe3b 100644 --- a/docs/api/puppeteer.frame.setcontent.md +++ b/docs/api/puppeteer.frame.setcontent.md @@ -10,22 +10,16 @@ Set the content of the frame. ```typescript class Frame { - abstract setContent( - html: string, - options?: { - timeout?: number; - waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[]; - } - ): Promise; + abstract setContent(html: string, options?: WaitForOptions): Promise; } ``` ## Parameters -| Parameter | Type | Description | -| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| 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. | +| Parameter | Type | Description | +| --------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| html | string | HTML markup to assign to the page. | +| options | [WaitForOptions](./puppeteer.waitforoptions.md) | _(Optional)_ Options to configure how long before timing out and at what point to consider the content setting successful. | **Returns:** diff --git a/packages/puppeteer-core/src/api/Frame.ts b/packages/puppeteer-core/src/api/Frame.ts index b50060d0f4f..ed6164552b3 100644 --- a/packages/puppeteer-core/src/api/Frame.ts +++ b/packages/puppeteer-core/src/api/Frame.ts @@ -339,12 +339,7 @@ export abstract class Frame extends EventEmitter { */ abstract goto( url: string, - options?: { - referer?: string; - referrerPolicy?: string; - timeout?: number; - waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[]; - } + options?: GoToOptions ): Promise; /** @@ -749,13 +744,7 @@ export abstract class Frame extends EventEmitter { * @param options - Options to configure how long before timing out and at * what point to consider the content setting successful. */ - abstract setContent( - html: string, - options?: { - timeout?: number; - waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[]; - } - ): Promise; + abstract setContent(html: string, options?: WaitForOptions): Promise; /** * @internal