Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
interface CustomQueryHandler
import { type CustomQueryHandler } from "https://deno.land/x/pptr@1.2.0/src/QueryHandler.ts";

Contains two functions queryOne and queryAll that can be Puppeteer.registerCustomQueryHandler | registered as alternative querying strategies. The functions queryOne and queryAll are executed in the page context. queryOne should take an Element and a selector string as argument and return a single Element or null if no element is found. queryAll takes the same arguments but should instead return a NodeListOf<Element> or Array<Element> with all the elements that match the given query selector.

Properties

optional
queryOne: (element: Element | Document, selector: string) => Element | null
optional
queryAll: (element: Element | Document, selector: string) => Element[] | NodeListOf<Element>