Closed adamreichold closed 8 months ago
Why not add the trait (e.g. TraverseElements
) to extend NodeRef as well and then implement added functions for ElementRef through that?
I wouldn't say it closes #157 as it currently adresses only half of the suggestion.
Why not add the trait (e.g.
TraverseElements
) to extend NodeRef as well and then implement added functions for ElementRef through that?I wouldn't say it closes #157 as it currently adresses only half of the suggestion.
As written above
(We could use an extension trait and such, but I think starting from an ElementRef is common enough, especially when using these iterators to stay within the elements.)
i.e. I don't think the additional complexity is warranted especially since one will most likely stay within the ElementRef
-typed world using these traversal helpers.
LGTM
Note that we cannot easily extend
NodeRef
as the types comes fromego-tree
, notscaper
.(We could use an extension trait and such, but I think starting from an
ElementRef
is common enough, especially when using these iterators to stay within the elements.)Closes #157