mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs(api.md): Fix sample code in API doc (#1821)
Because `Request.url` is changed to `Request.url()`.
This commit is contained in:
parent
2bf42fd779
commit
102f10cbc7
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user