<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) > [puppeteer](./puppeteer.md) > [Frame](./puppeteer.frame.md) > [$eval](./puppeteer.frame._eval.md) ## Frame.$eval() method <b>Signature:</b> ```typescript $eval<ReturnType>(selector: string, pageFunction: (element: Element, ...args: unknown[]) => ReturnType | Promise<ReturnType>, ...args: SerializableOrJSHandle[]): Promise<WrapElementHandle<ReturnType>>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | selector | string | | | pageFunction | (element: Element, ...args: unknown\[\]) => ReturnType \| Promise<ReturnType> | | | args | [SerializableOrJSHandle](./puppeteer.serializableorjshandle.md)<!-- -->\[\] | | <b>Returns:</b> Promise<[WrapElementHandle](./puppeteer.wrapelementhandle.md)<!-- --><ReturnType>>