Skip to main content
Version: 23.8.0

JSHandle.jsonValue() 方法

¥JSHandle.jsonValue() method

表示引用对象的可序列化部分的普通对象。

¥A vanilla object representing the serializable portions of the referenced object.

签名

¥Signature

class JSHandle {
abstract jsonValue(): Promise<T>;
}

Returns:

Promise<T>

异常

¥Exceptions

如果对象由于循环而无法序列化,则抛出该异常。

¥Throws if the object cannot be serialized due to circularity.

备注

¥Remarks

如果对象有 toJSON 函数,则不会调用它。

¥If the object has a toJSON function, it will not be called.