From 851fe8d0bdc653f2543c3dc3b0aa9763d70c99ae Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Thu, 19 Aug 2021 12:23:35 -0700 Subject: [PATCH] docs: use language-neutral references to page.goto (#8320) --- docs/src/api/class-frame.md | 6 +++--- docs/src/api/class-page.md | 6 +++--- docs/src/navigations.md | 2 +- types/types.d.ts | 14 +++++++------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/src/api/class-frame.md b/docs/src/api/class-frame.md index 11b7ac6051..3f4faa6b06 100644 --- a/docs/src/api/class-frame.md +++ b/docs/src/api/class-frame.md @@ -777,19 +777,19 @@ Attribute name to get the value for. Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. -`frame.goto` will throw an error if: +The method will throw an error if: * there's an SSL error (e.g. in case of self-signed certificates). * target URL is invalid. * the [`option: timeout`] is exceeded during navigation. * the remote server does not respond or is unreachable. * the main resource failed to load. -`frame.goto` will not throw an error when any valid HTTP status code is returned by the remote server, including 404 +The method will not throw an error when any valid HTTP status code is returned by the remote server, including 404 "Not Found" and 500 "Internal Server Error". The status code for such responses can be retrieved by calling [`method: Response.status`]. :::note -`frame.goto` either throws an error or returns a main resource response. The only exceptions are navigation to +The method either throws an error or returns a main resource response. The only exceptions are navigation to `about:blank` or navigation to the same URL with a different hash, which would succeed and return `null`. ::: diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.md index db83540ca5..30129353c9 100644 --- a/docs/src/api/class-page.md +++ b/docs/src/api/class-page.md @@ -1877,19 +1877,19 @@ Navigate to the next page in history. Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. -`page.goto` will throw an error if: +The method will throw an error if: * there's an SSL error (e.g. in case of self-signed certificates). * target URL is invalid. * the [`option: timeout`] is exceeded during navigation. * the remote server does not respond or is unreachable. * the main resource failed to load. -`page.goto` will not throw an error when any valid HTTP status code is returned by the remote server, including 404 "Not +The method will not throw an error when any valid HTTP status code is returned by the remote server, including 404 "Not Found" and 500 "Internal Server Error". The status code for such responses can be retrieved by calling [`method: Response.status`]. :::note -`page.goto` either throws an error or returns a main resource response. The only exceptions are navigation to +The method either throws an error or returns a main resource response. The only exceptions are navigation to `about:blank` or navigation to the same URL with a different hash, which would succeed and return `null`. ::: diff --git a/docs/src/navigations.md b/docs/src/navigations.md index 4bcf9de6d7..5c60bd65d2 100644 --- a/docs/src/navigations.md +++ b/docs/src/navigations.md @@ -34,7 +34,7 @@ Navigations can be initiated by changing the URL bar, reloading the page or goin ### Auto-wait Navigating to a URL auto-waits for the page to fire the `load` event. If the page does a client-side redirect before -`load`, `page.goto` will auto-wait for the redirected page to fire the `load` event. +`load`, [`method: Page.goto`] will auto-wait for the redirected page to fire the `load` event. ```js // Navigate the page diff --git a/types/types.d.ts b/types/types.d.ts index 2f413e531d..330f0cfa51 100644 --- a/types/types.d.ts +++ b/types/types.d.ts @@ -1760,18 +1760,18 @@ export interface Page { * Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the * last redirect. * - * `page.goto` will throw an error if: + * The method will throw an error if: * - there's an SSL error (e.g. in case of self-signed certificates). * - target URL is invalid. * - the `timeout` is exceeded during navigation. * - the remote server does not respond or is unreachable. * - the main resource failed to load. * - * `page.goto` will not throw an error when any valid HTTP status code is returned by the remote server, including 404 "Not + * The method will not throw an error when any valid HTTP status code is returned by the remote server, including 404 "Not * Found" and 500 "Internal Server Error". The status code for such responses can be retrieved by calling * [response.status()](https://playwright.dev/docs/api/class-response#response-status). * - * > NOTE: `page.goto` either throws an error or returns a main resource response. The only exceptions are navigation to + * > NOTE: The method either throws an error or returns a main resource response. The only exceptions are navigation to * `about:blank` or navigation to the same URL with a different hash, which would succeed and return `null`. * > NOTE: Headless mode doesn't support navigation to a PDF document. See the * [upstream issue](https://bugs.chromium.org/p/chromium/issues/detail?id=761295). @@ -4034,18 +4034,18 @@ export interface Frame { * Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the * last redirect. * - * `frame.goto` will throw an error if: + * The method will throw an error if: * - there's an SSL error (e.g. in case of self-signed certificates). * - target URL is invalid. * - the `timeout` is exceeded during navigation. * - the remote server does not respond or is unreachable. * - the main resource failed to load. * - * `frame.goto` will not throw an error when any valid HTTP status code is returned by the remote server, including 404 - * "Not Found" and 500 "Internal Server Error". The status code for such responses can be retrieved by calling + * The method will not throw an error when any valid HTTP status code is returned by the remote server, including 404 "Not + * Found" and 500 "Internal Server Error". The status code for such responses can be retrieved by calling * [response.status()](https://playwright.dev/docs/api/class-response#response-status). * - * > NOTE: `frame.goto` either throws an error or returns a main resource response. The only exceptions are navigation to + * > NOTE: The method either throws an error or returns a main resource response. The only exceptions are navigation to * `about:blank` or navigation to the same URL with a different hash, which would succeed and return `null`. * > NOTE: Headless mode doesn't support navigation to a PDF document. See the * [upstream issue](https://bugs.chromium.org/p/chromium/issues/detail?id=761295).