Skip to content

Commit

Permalink
docs(api.md): fix snippet to await page.setViewport() (puppeteer#2113)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored and aslushnikov committed Mar 1, 2018
1 parent ffe5b63 commit c857aef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down

0 comments on commit c857aef

Please sign in to comment.