docs(python): fix missing await in JS evaluation example (#14426)
This commit is contained in:
parent
bb2d7cb9ad
commit
3030d97b2b
|
|
@ -54,7 +54,7 @@ status = await page.evaluate("""async () => {
|
||||||
|
|
||||||
```python sync
|
```python sync
|
||||||
status = page.evaluate("""async () => {
|
status = page.evaluate("""async () => {
|
||||||
response = fetch(location.href)
|
response = await fetch(location.href)
|
||||||
return response.status
|
return response.status
|
||||||
}""")
|
}""")
|
||||||
```
|
```
|
||||||
|
|
@ -367,6 +367,6 @@ var data = new { text = "some data", value = 1};
|
||||||
// Pass data as a parameter
|
// Pass data as a parameter
|
||||||
var result = await page.EvaluateAsync(@"data => {
|
var result = await page.EvaluateAsync(@"data => {
|
||||||
// There is no |data| in the web page.
|
// There is no |data| in the web page.
|
||||||
window.myApp.use(data);
|
window.myApp.use(data);
|
||||||
}");
|
}");
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue