Function getElementsByTagName

  • getElementsByTagName(tagName: string | ((name: string) => boolean), nodes: AnyNode | AnyNode[], recurse?: boolean, limit?: number): Element[]
  • Returns all nodes with the supplied tagName.


    All nodes with the supplied tagName.


    • tagName: string | ((name: string) => boolean)

      Tag name to search for.

    • nodes: AnyNode | AnyNode[]

      Nodes to search through.

    • recurse: boolean = true

      Also consider child nodes.

    • limit: number = Infinity

      Maximum number of nodes to return.

    Returns Element[]