An iterator for node tree traversal

This iterator is convenient but seems a little slower.

Type Parameters

Constructors

Methods

Constructors

  • Create an iterator with type specified

    The nodeTypeLimit is used to limit which kind of nodes will be returned. It limits the returned result by an instanceof call. The default value is Element , which means only elements will be returned (text nodes will not). Consider specifying Object if text nodes need to be returned as well as elements. Specify Component will only return components.

    Type Parameters

    Parameters

    Returns ElementIterator<T>

Methods

  • Returns Generator<T, void, boolean | void>

  • Parameters

    • f: ((node) => boolean | void)
        • (node): boolean | void
        • Parameters

          • node: T

          Returns boolean | void

    Returns void