Skip to content

Commit d487a31

Browse files
authored
doc: fix the route docs (#2174)
1 parent 437d1b6 commit d487a31

File tree

3 files changed

+576
-985
lines changed

3 files changed

+576
-985
lines changed

docs/api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ Creates a new page in the browser context.
492492
- returns: <[Array]<[Page]>> All open pages in the context. Non visible pages, such as `"background_page"`, will not be listed here. You can find them using [chromiumBrowserContext.backgroundPages()](#chromiumbrowsercontextbackgroundpages).
493493

494494
#### browserContext.route(url, handler)
495-
- `url` <[string]|[RegExp]|[function]\([string]\):[boolean]> A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
495+
- `url` <[string]|[RegExp]|[function]\([URL]\):[boolean]> A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
496496
- `handler` <[function]\([Route], [Request]\)> handler function to route the request.
497497
- returns: <[Promise]>
498498

@@ -581,7 +581,7 @@ To disable authentication, pass `null`.
581581
- returns: <[Promise]>
582582

583583
#### browserContext.unroute(url[, handler])
584-
- `url` <[string]|[RegExp]|[function]\([string]\):[boolean]> A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
584+
- `url` <[string]|[RegExp]|[function]\([URL]\):[boolean]> A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
585585
- `handler` <[function]\([Route], [Request]\)> Handler function to route the request.
586586
- returns: <[Promise]>
587587

@@ -1481,7 +1481,7 @@ await browser.close();
14811481
- returns: <[Promise]<?[Response]>> Promise which resolves to the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect.
14821482

14831483
#### page.route(url, handler)
1484-
- `url` <[string]|[RegExp]|[function]\([string]\):[boolean]> A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
1484+
- `url` <[string]|[RegExp]|[function]\([URL]\):[boolean]> A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
14851485
- `handler` <[function]\([Route], [Request]\)> handler function to route the request.
14861486
- returns: <[Promise]>.
14871487

@@ -1672,7 +1672,7 @@ If there's no element matching `selector`, the method waits until a matching ele
16721672
Shortcut for [page.mainFrame().uncheck(selector[, options])](#frameuncheckselector-options).
16731673

16741674
#### page.unroute(url[, handler])
1675-
- `url` <[string]|[RegExp]|[function]\([string]\):[boolean]> A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
1675+
- `url` <[string]|[RegExp]|[function]\([URL]\):[boolean]> A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
16761676
- `handler` <[function]\([Route], [Request]\)> Handler function to route the request.
16771677
- returns: <[Promise]>
16781678

0 commit comments

Comments
 (0)