diff --git a/new-docs/puppeteer.frame.goto.md b/new-docs/puppeteer.frame.goto.md index b98308a4..2395e111 100644 --- a/new-docs/puppeteer.frame.goto.md +++ b/new-docs/puppeteer.frame.goto.md @@ -7,7 +7,7 @@ Signature: ```typescript -goto(url: string, options: { +goto(url: string, options?: { referer?: string; timeout?: number; waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[]; diff --git a/new-docs/puppeteer.page.goto.md b/new-docs/puppeteer.page.goto.md index 3463d9b8..f43ef671 100644 --- a/new-docs/puppeteer.page.goto.md +++ b/new-docs/puppeteer.page.goto.md @@ -7,7 +7,7 @@ Signature: ```typescript -goto(url: string, options: WaitForOptions & { +goto(url: string, options?: WaitForOptions & { referer?: string; }): Promise; ``` diff --git a/src/FrameManager.ts b/src/FrameManager.ts index 3ac37085..e50617bf 100644 --- a/src/FrameManager.ts +++ b/src/FrameManager.ts @@ -412,7 +412,7 @@ export class Frame { referer?: string; timeout?: number; waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[]; - } + } = {} ): Promise { return await this._frameManager.navigateFrame(this, url, options); } diff --git a/src/Page.ts b/src/Page.ts index c5f51179..79bb1d51 100644 --- a/src/Page.ts +++ b/src/Page.ts @@ -838,7 +838,7 @@ export class Page extends EventEmitter { async goto( url: string, - options: WaitForOptions & { referer?: string } + options: WaitForOptions & { referer?: string } = {} ): Promise { return await this._frameManager.mainFrame().goto(url, options); }