Function findAll

  • Search an array of nodes and their children for elements passing a test function.

    Same as find, but limited to elements and with less options, leading to reduced complexity.

    Parameters

    • test: ((elem: Element) => boolean)

      Function to test nodes on.

        • (elem): boolean
        • Parameters

          • elem: Element

          Returns boolean

    • nodes: AnyNode[]

      Array of nodes to search.

    Returns Element[]

    All nodes passing test.