Back to Puppeteer

JSHandle.jsonValue() method

website/versioned_docs/version-24.40.0/api/puppeteer.jshandle.jsonvalue.md

19.2.2390 B
Original Source

JSHandle.jsonValue() method

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

Signature

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

Returns:

Promise<T>

Exceptions

Throws if the object cannot be serialized due to circularity.

Remarks

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