chore(docs): fix console example in docs/api.md
This commit is contained in:
parent
d3976cb0a5
commit
59bcc2ee56
@ -266,7 +266,7 @@ An example of handling `console` event:
|
|||||||
```js
|
```js
|
||||||
page.on('console', msg => {
|
page.on('console', msg => {
|
||||||
for (let i = 0; i < msg.args.length; ++i)
|
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'}));
|
page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user