@@ -380,11 +380,11 @@ export interface Page {
380
380
* An example of handling `console` event:
381
381
*
382
382
* ```js
383
- * page.on('console', msg => {
383
+ * page.on('console', async msg => {
384
384
* for (let i = 0; i < msg.args().length; ++i)
385
385
* console.log(`${i}: ${await msg.args()[i].jsonValue()}`);
386
386
* });
387
- * page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
387
+ * await page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
388
388
* ```
389
389
*
390
390
*/
@@ -554,11 +554,11 @@ export interface Page {
554
554
* An example of handling `console` event:
555
555
*
556
556
* ```js
557
- * page.on('console', msg => {
557
+ * page.on('console', async msg => {
558
558
* for (let i = 0; i < msg.args().length; ++i)
559
559
* console.log(`${i}: ${await msg.args()[i].jsonValue()}`);
560
560
* });
561
- * page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
561
+ * await page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
562
562
* ```
563
563
*
564
564
*/
@@ -728,11 +728,11 @@ export interface Page {
728
728
* An example of handling `console` event:
729
729
*
730
730
* ```js
731
- * page.on('console', msg => {
731
+ * page.on('console', async msg => {
732
732
* for (let i = 0; i < msg.args().length; ++i)
733
733
* console.log(`${i}: ${await msg.args()[i].jsonValue()}`);
734
734
* });
735
- * page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
735
+ * await page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
736
736
* ```
737
737
*
738
738
*/
@@ -902,11 +902,11 @@ export interface Page {
902
902
* An example of handling `console` event:
903
903
*
904
904
* ```js
905
- * page.on('console', msg => {
905
+ * page.on('console', async msg => {
906
906
* for (let i = 0; i < msg.args().length; ++i)
907
907
* console.log(`${i}: ${await msg.args()[i].jsonValue()}`);
908
908
* });
909
- * page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
909
+ * await page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
910
910
* ```
911
911
*
912
912
*/
@@ -1076,11 +1076,11 @@ export interface Page {
1076
1076
* An example of handling `console` event:
1077
1077
*
1078
1078
* ```js
1079
- * page.on('console', msg => {
1079
+ * page.on('console', async msg => {
1080
1080
* for (let i = 0; i < msg.args().length; ++i)
1081
1081
* console.log(`${i}: ${await msg.args()[i].jsonValue()}`);
1082
1082
* });
1083
- * page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
1083
+ * await page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
1084
1084
* ```
1085
1085
*
1086
1086
*/
@@ -2937,11 +2937,11 @@ export interface Page {
2937
2937
* An example of handling `console` event:
2938
2938
*
2939
2939
* ```js
2940
- * page.on('console', msg => {
2940
+ * page.on('console', async msg => {
2941
2941
* for (let i = 0; i < msg.args().length; ++i)
2942
2942
* console.log(`${i}: ${await msg.args()[i].jsonValue()}`);
2943
2943
* });
2944
- * page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
2944
+ * await page.evaluate(() => console.log('hello', 5, {foo: 'bar'}));
2945
2945
* ```
2946
2946
*
2947
2947
*/
0 commit comments