himalaya icon indicating copy to clipboard operation
himalaya copied to clipboard

Recursively find/filter elements in the "dom"

Open mikemfleming opened this issue 5 years ago • 1 comments

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 ?

mikemfleming avatar Oct 03 '19 18:10 mikemfleming

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.

tangert avatar Mar 09 '20 22:03 tangert