method select should be implemented as a trait
Both Html & ElementRef support the same method select. Having that method implemented as a Trait would allow to create a function that can accept both, and would allow to call that method generically, which doesn't seem to be currently possible.
My current workaround is to call root_element() on Html, to get its ElementRef, which fortunately works even if it's just an html fragment without the <html> tag... Although its description didn't seem to indicate so.
@joseluis The select methods does not return the same type so I don't think it would make sense to create a trait.
With GATs perhaps this is worth a relook. This could clean up a lot of code duplicating basic select usage with methods that work for both Selector types, as well as make unit tests cleaner, able to just use an &Html from a raw string and get the same result.
I think this would introduce additional complexity but not too much benefit (just a few extra lines here and there). Additionally we want to minimise breaking changes wherever possible.
As this wouldn't be a very big change, anyone interested is welcome to propose a pull request (with a few examples) for a new API.