Skip to main content
Version: Next

ElementHandle.$$eval() method

Signature:

class ElementHandle {
$$eval<
Params extends unknown[],
Func extends EvaluateFunc<[Element[], ...Params]> = EvaluateFunc<
[Element[], ...Params]
>
>(
selector: string,
pageFunction: Func | string,
...args: Params
): Promise<Awaited<ReturnType<Func>>>;
}

Parameters

ParameterTypeDescription
selectorstring
pageFunctionFunc | string
argsParams

Returns:

Promise<Awaited<ReturnType<Func>>>