docs(route): add note about unroute (#6019)
This commit is contained in:
parent
2f5bf04f51
commit
26f9e29623
|
|
@ -719,6 +719,8 @@ browser.close()
|
||||||
Page routes (set up with [`method: Page.route`]) take precedence over browser context routes when request matches both
|
Page routes (set up with [`method: Page.route`]) take precedence over browser context routes when request matches both
|
||||||
handlers.
|
handlers.
|
||||||
|
|
||||||
|
To remove a route with its handler you can use [`method: BrowserContext.unroute`].
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
Enabling routing disables http cache.
|
Enabling routing disables http cache.
|
||||||
:::
|
:::
|
||||||
|
|
|
||||||
|
|
@ -2132,6 +2132,8 @@ browser.close()
|
||||||
Page routes take precedence over browser context routes (set up with [`method: BrowserContext.route`]) when request
|
Page routes take precedence over browser context routes (set up with [`method: BrowserContext.route`]) when request
|
||||||
matches both handlers.
|
matches both handlers.
|
||||||
|
|
||||||
|
To remove a route with its handler you can use [`method: Page.unroute`].
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
Enabling routing disables http cache.
|
Enabling routing disables http cache.
|
||||||
:::
|
:::
|
||||||
|
|
|
||||||
6
types/types.d.ts
vendored
6
types/types.d.ts
vendored
|
|
@ -2351,6 +2351,9 @@ export interface Page {
|
||||||
* [browserContext.route(url, handler)](https://playwright.dev/docs/api/class-browsercontext#browsercontextrouteurl-handler))
|
* [browserContext.route(url, handler)](https://playwright.dev/docs/api/class-browsercontext#browsercontextrouteurl-handler))
|
||||||
* when request matches both handlers.
|
* when request matches both handlers.
|
||||||
*
|
*
|
||||||
|
* To remove a route with its handler you can use
|
||||||
|
* [page.unroute(url[, handler])](https://playwright.dev/docs/api/class-page#pageunrouteurl-handler).
|
||||||
|
*
|
||||||
* > NOTE: Enabling routing disables http cache.
|
* > NOTE: Enabling routing disables http cache.
|
||||||
* @param url A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
|
* @param url A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
|
||||||
* @param handler handler function to route the request.
|
* @param handler handler function to route the request.
|
||||||
|
|
@ -5012,6 +5015,9 @@ export interface BrowserContext {
|
||||||
* Page routes (set up with [page.route(url, handler)](https://playwright.dev/docs/api/class-page#pagerouteurl-handler))
|
* Page routes (set up with [page.route(url, handler)](https://playwright.dev/docs/api/class-page#pagerouteurl-handler))
|
||||||
* take precedence over browser context routes when request matches both handlers.
|
* take precedence over browser context routes when request matches both handlers.
|
||||||
*
|
*
|
||||||
|
* To remove a route with its handler you can use
|
||||||
|
* [browserContext.unroute(url[, handler])](https://playwright.dev/docs/api/class-browsercontext#browsercontextunrouteurl-handler).
|
||||||
|
*
|
||||||
* > NOTE: Enabling routing disables http cache.
|
* > NOTE: Enabling routing disables http cache.
|
||||||
* @param url A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
|
* @param url A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
|
||||||
* @param handler handler function to route the request.
|
* @param handler handler function to route the request.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue