Function getElementsByTagType

  • Returns all nodes with the supplied type.

    Parameters

    • type: ElementType | ((type: ElementType) => boolean)

      Element type to look 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 AnyNode[]

    All nodes with the supplied type.