JSHandle.evaluateHandle() 方法
¥JSHandle.evaluateHandle() method
使用当前句柄作为第一个参数来计算给定函数。
¥Evaluates the given function with the current handle as its first argument.
签名
¥Signature
class JSHandle {
evaluateHandle<
Params extends unknown[],
Func extends EvaluateFuncWith<T, Params> = EvaluateFuncWith<T, Params>,
>(
pageFunction: Func | string,
...args: Params
): Promise<HandleFor<Awaited<ReturnType<Func>>>>;
}
参数
¥Parameters
范围 | 类型 | 描述 |
---|---|---|
pageFunction | 功能 | 字符串 | |
args | 参数 |
Returns:
Promise<HandleFor<Awaited<ReturnType<Func>>>>