docs: route.fallback() vs. route.continue()
Fixes https://github.com/microsoft/playwright/issues/31983
This commit is contained in:
parent
d0c840f639
commit
987370360c
|
|
@ -104,6 +104,8 @@ await page.RouteAsync("**/*", async route =>
|
|||
|
||||
Note that any overrides such as [`option: url`] or [`option: headers`] only apply to the request being routed. If this request results in a redirect, overrides will not be applied to the new redirected request. If you want to propagate a header through redirects, use the combination of [`method: Route.fetch`] and [`method: Route.fulfill`] instead.
|
||||
|
||||
[`method: Route.continue`] will immediately send the request to the netwok, other matching handlers won't be invoked. Use [`method: Route.fallback`] If you want next matching handler in the chain to be invoked.
|
||||
|
||||
### option: Route.continue.url
|
||||
* since: v1.8
|
||||
- `url` <[string]>
|
||||
|
|
|
|||
5
packages/playwright-core/types/types.d.ts
vendored
5
packages/playwright-core/types/types.d.ts
vendored
|
|
@ -19424,6 +19424,11 @@ export interface Route {
|
|||
* through redirects, use the combination of
|
||||
* [route.fetch([options])](https://playwright.dev/docs/api/class-route#route-fetch) and
|
||||
* [route.fulfill([options])](https://playwright.dev/docs/api/class-route#route-fulfill) instead.
|
||||
*
|
||||
* [route.continue([options])](https://playwright.dev/docs/api/class-route#route-continue) will immediately send the
|
||||
* request to the netwok, other matching handlers won't be invoked. Use
|
||||
* [route.fallback([options])](https://playwright.dev/docs/api/class-route#route-fallback) If you want next matching
|
||||
* handler in the chain to be invoked.
|
||||
* @param options
|
||||
*/
|
||||
continue(options?: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue