From 102f10cbc7ebc1b156b1a54f21ce9bdb917d6632 Mon Sep 17 00:00:00 2001 From: "Sakamoto, Kazunori" Date: Fri, 19 Jan 2018 14:39:50 +0900 Subject: [PATCH] docs(api.md): Fix sample code in API doc (#1821) Because `Request.url` is changed to `Request.url()`. --- docs/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();