Function getElementById

  • getElementById(id: string | ((id: string) => boolean), nodes: AnyNode | AnyNode[], recurse?: boolean): Element | null
  • Returns the node with the supplied ID.


    The node with the supplied ID.


    • id: string | ((id: string) => boolean)

      The unique ID attribute value to look for.

    • nodes: AnyNode | AnyNode[]

      Nodes to search through.

    • recurse: boolean = true

      Also consider child nodes.

    Returns Element | null