Skip to content

Commit

Permalink
docs(api): fix typo in elementHandle.evaluateHandle() (#6276)
Browse files Browse the repository at this point in the history
  • Loading branch information
devjerry committed Jul 27, 2020
1 parent 8c1a586 commit a47b556
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api.md
Expand Up @@ -3511,11 +3511,11 @@ expect(await tweetHandle.evaluate(node => node.innerText)).toBe('10');

This method passes this handle as the first argument to `pageFunction`.

The only difference between `evaluateHandle.evaluate` and `evaluateHandle.evaluateHandle` is that `executionContext.evaluateHandle` returns in-page object (JSHandle).
The only difference between `elementHandle.evaluate` and `elementHandle.evaluateHandle` is that `executionContext.evaluateHandle` returns in-page object (JSHandle).

If the function returns an element, the returned handle is an [ElementHandle].

If the function passed to the `evaluateHandle.evaluateHandle` returns a [Promise], then `evaluateHandle.evaluateHandle` would wait for the promise to resolve and return its value.
If the function passed to the `elementHandle.evaluateHandle` returns a [Promise], then `elementHandle.evaluateHandle` would wait for the promise to resolve and return its value.

See [Page.evaluateHandle](#pageevaluatehandlepagefunction-args) for more details.

Expand Down

0 comments on commit a47b556

Please sign in to comment.