Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pptr/mod.ts>Frame#$eval

Headless Chrome Deno API
Latest
method Frame.prototype.$eval
Re-export
import { Frame } from "https://deno.land/x/pptr@1.2.0/mod.ts";

Examples

Example 1

const searchValue = await frame.$eval('#search', el => el.value);

Type Parameters

ReturnType

Parameters

selector: string
  • the selector to query for
pageFunction: (element: Element, ...args: unknown[]) => ReturnType | Promise<ReturnType>
  • the function to be evaluated in the frame's context
  • additional arguments to pass to pageFuncton