From c857aef5893042ac2f8b587283683396ae9c333b Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Thu, 1 Mar 2018 22:06:22 +0100 Subject: [PATCH] docs(api.md): fix snippet to await page.setViewport() (#2113) --- docs/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api.md b/docs/api.md index c66bd2a4..e84281a7 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1337,7 +1337,7 @@ const puppeteer = require('puppeteer'); puppeteer.launch().then(async browser => { const page = await browser.newPage(); const watchDog = page.waitForFunction('window.innerWidth < 100'); - page.setViewport({width: 50, height: 50}); + await page.setViewport({width: 50, height: 50}); await watchDog; await browser.close(); });