diff --git a/docs/api.md b/docs/api.md index 3200c44d..e98eecc0 100644 --- a/docs/api.md +++ b/docs/api.md @@ -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();