parent
bc6902623a
commit
2f1157b044
@ -428,8 +428,8 @@ The arguments passed into `console.log` appear as arguments on the event handler
|
||||
An example of handling `console` event:
|
||||
```js
|
||||
page.on('console', msg => {
|
||||
for (let i = 0; i < msg.args.length; ++i)
|
||||
console.log(`${i}: ${msg.args[i]}`);
|
||||
for (let i = 0; i < msg.args().length; ++i)
|
||||
console.log(`${i}: ${msg.args()[i]}`);
|
||||
});
|
||||
page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user