chore(docs): fix console example in docs/api.md

This commit is contained in:
Andrey Lushnikov 2017-10-05 17:34:13 -07:00 committed by GitHub
parent d3976cb0a5
commit 59bcc2ee56

View File

@ -266,7 +266,7 @@ An example of handling `console` event:
```js
page.on('console', msg => {
for (let i = 0; i < msg.args.length; ++i)
console.log(`${i}: ${args[i]}`);
console.log(`${i}: ${msg.args[i]}`);
});
page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
```