Skip to main content
Version: 23.10.1

Frame.evaluateHandle() 方法

¥Frame.evaluateHandle() method

行为与 Page.evaluateHandle() 相同,只是它在此框架的上下文中运行。

¥Behaves identically to Page.evaluateHandle() except it's run within the context of this frame.

详情请参阅 Page.evaluateHandle()

¥See Page.evaluateHandle() for details.

签名

¥Signature

class Frame {
evaluateHandle<
Params extends unknown[],
Func extends EvaluateFunc<Params> = EvaluateFunc<Params>,
>(
pageFunction: Func | string,
...args: Params
): Promise<HandleFor<Awaited<ReturnType<Func>>>>;
}

参数

¥Parameters

范围

类型

描述

pageFunction

功能 | 字符串

args

参数

Returns:

Promise<HandleFor<Awaited<ReturnType<Func>>>>