queryByText method

BloomNode? queryByText(
  1. String text
)

Finds the first node whose direct text content equals text.

Matches both TextNode leaf nodes and ElNode elements utilizing the text parameter. Returns null if no matching node is found.

Implementation

BloomNode? queryByText(String text) {
  return _find(root, (n) => _textOf(n) == text);
}