Skip to content

Commit

Permalink
docs(python): fix missing await in JS evaluation example (microsoft#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
trogowski authored May 27, 2022
1 parent bb2d7cb commit 3030d97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/evaluating.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ status = await page.evaluate("""async () => {

```python sync
status = page.evaluate("""async () => {
response = fetch(location.href)
response = await fetch(location.href)
return response.status
}""")
```
Expand Down Expand Up @@ -367,6 +367,6 @@ var data = new { text = "some data", value = 1};
// Pass data as a parameter
var result = await page.EvaluateAsync(@"data => {
// There is no |data| in the web page.
window.myApp.use(data);
window.myApp.use(data);
}");
```

0 comments on commit 3030d97

Please sign in to comment.