Skip to content

Commit

Permalink
docs(api.md): Fix sample code in API doc (#1821)
Browse files Browse the repository at this point in the history
Because `Request.url` is changed to `Request.url()`.
  • Loading branch information
exKAZUu authored and aslushnikov committed Jan 19, 2018
1 parent 2bf42fd commit 102f10c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api.md
Expand Up @@ -1121,7 +1121,7 @@ puppeteer.launch().then(async browser => {
const page = await browser.newPage();
await page.setRequestInterception(true);
page.on('request', interceptedRequest => {
if (interceptedRequest.url.endsWith('.png') || interceptedRequest.url.endsWith('.jpg'))
if (interceptedRequest.url().endsWith('.png') || interceptedRequest.url().endsWith('.jpg'))
interceptedRequest.abort();
else
interceptedRequest.continue();
Expand Down

0 comments on commit 102f10c

Please sign in to comment.