puppeteer/docs/api/puppeteer.nodefor.md
jrandolf 5ff205dc8b
fix: extends ElementHandle to Nodes (#8552)
* fix: extends `ElementHandle` to `Node`s (#8552)
2022-07-06 09:05:37 +02:00

324 B

sidebar_label
NodeFor

NodeFor type

Signature:

export declare type NodeFor<Selector extends string> =
  Selector extends keyof HTMLElementTagNameMap
    ? HTMLElementTagNameMap[Selector]
    : Selector extends keyof SVGElementTagNameMap
    ? SVGElementTagNameMap[Selector]
    : Element;