We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07fb81a commit af92565Copy full SHA for af92565
docs/src/api/class-page.md
@@ -137,11 +137,11 @@ The arguments passed into `console.log` appear as arguments on the event handler
137
An example of handling `console` event:
138
139
```js
140
-page.on('console', msg => {
+page.on('console', async msg => {
141
for (let i = 0; i < msg.args().length; ++i)
142
console.log(`${i}: ${await msg.args()[i].jsonValue()}`);
143
});
144
-page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
+await page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
145
```
146
147
```java
0 commit comments