fix(docs): missing arguments for functions in page.route

This commit is contained in:
Joel Einbinder 2020-02-06 16:53:51 -08:00
parent ffc1022717
commit 337eec1173

View file

@ -1202,9 +1202,9 @@ The `format` options are:
- 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. - 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.
#### page.route(url, handler) #### page.route(url, handler)
- `url` <[string]|[RegExp]|[Function]> A glob pattern, regex pattern or predicate receiving [URL] to match while routing. - `url` <[string]|[RegExp]|[function]\([string]\):[boolean]> A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
- `handler` <[Function]> handler function to router the request. - `handler` <[function]\([Request]\)> handler function to router the request.
- returns: <[Promise]<[void]>>. - returns: <[Promise]>.
Routing activates the request interception and enables `request.abort`, `request.continue` and Routing activates the request interception and enables `request.abort`, `request.continue` and
`request.respond` methods on the request. This provides the capability to modify network requests that are made by a page. `request.respond` methods on the request. This provides the capability to modify network requests that are made by a page.