himalaya
himalaya copied to clipboard
Recursively find/filter elements in the "dom"
This is something that we have had to implement ourselves but I could see it being useful as an out of the box feature for Himalaya.
If you think of the return value of Himalaya parsing/stringifying, it represents the dom. Only the dom has built in query selectors. This would just add a util that accepts a callback and queries the return value. Much like Array.prototype.filter
.
Thoughts @andrejewski @xdumaine ?
I feel like the point of this library is to keep it lightweight and any actual scraping / selection should be left to the user. One option might be to have extensions like himalaya-select
that could include selection functions. Currently working on something like this.