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.

    • nodes: ParentNode | AnyNode[]

      Array of nodes to search.

    Returns Element[]

    All nodes passing test.