diff --git a/docs/src/api/class-frame.md b/docs/src/api/class-frame.md index 2ff682af1e..76de5d71bf 100644 --- a/docs/src/api/class-frame.md +++ b/docs/src/api/class-frame.md @@ -517,7 +517,7 @@ Optional argument to pass to [`param: expression`]. Returns the return value of [`param: expression`] as a [JSHandle]. The only difference between [`method: Frame.evaluate`] and [`method: Frame.evaluateHandle`] is that -[method: Frame.evaluateHandle`] returns [JSHandle]. +[`method: Frame.evaluateHandle`] returns [JSHandle]. If the function, passed to the [`method: Frame.evaluateHandle`], returns a [Promise], then [`method: Frame.evaluateHandle`] would wait for the promise to resolve and return its value. diff --git a/types/types.d.ts b/types/types.d.ts index 95459d902d..88d96b3e54 100644 --- a/types/types.d.ts +++ b/types/types.d.ts @@ -3271,7 +3271,9 @@ export interface Frame { * The only difference between * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frameevaluatepagefunction-arg) and * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frameevaluatehandlepagefunction-arg) - * is that [method: Frame.evaluateHandle`] returns [JSHandle]. + * is that + * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frameevaluatehandlepagefunction-arg) + * returns [JSHandle]. * * If the function, passed to the * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frameevaluatehandlepagefunction-arg),