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(); });