JSHandle.jsonValue() 方法
🌐 JSHandle.jsonValue() method
表示引用对象的可序列化部分的普通对象。
🌐 A vanilla object representing the serializable portions of the referenced object.
语法
🌐 Signature
class JSHandle {
abstract jsonValue(): Promise<T>;
}
返回:
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.