Options
All
  • Public
  • Public/Protected
  • All
Menu

Contains two functions queryOne and queryAll that can be {@link 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.

Hierarchy

  • CustomQueryHandler

Index

Properties

Properties

Optional queryAll

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

Type declaration

    • (element: Element | Document, selector: string): Element[] | NodeListOf<Element>
    • Parameters

      • element: Element | Document
      • selector: string

      Returns Element[] | NodeListOf<Element>

Optional queryOne

queryOne: (element: Element | Document, selector: string) => null | Element

Type declaration

    • (element: Element | Document, selector: string): null | Element
    • Parameters

      • element: Element | Document
      • selector: string

      Returns null | Element

Generated using TypeDoc