The OpenD Programming Language

Selector.matchesElement

Returns true if the given element matches this selector, considered relative to an arbitrary element.

You can do a form of lazy querySelectorAll by using this with std.algorithm.iteration.filter:

Selector sel = Selector("foo > bar");
auto lazySelectorRange = element.tree.filter!(e => sel.matchElement(e))(document.root);
struct Selector
bool
matchesElement

Meta