laverdet / isolated-vm

Secure & isolated JS environments for nodejs
ISC License
2.2k stars 154 forks source link

isolated-vm doesn't work with jquery selectors #432

Open cutepandaforeverandever opened 11 months ago

cutepandaforeverandever commented 11 months ago

I am using the Cheerio library to parse HTML using isolated-vm. I am using a jQuery-like selector to select elements from the parsed HTML. However, I am encountering issues when trying to execute this jQuery selector expression within isolated-vm. The problem seems to be that the entire jQuery selector expression cannot be executed in one go in the isolated VM. As a workaround, i am considering splitting the jQuery selector and the subsequent expression into separate parts. However, this approach appears to complicate the handling of selectors like $("strong")[0]. Therefore, I amlooking for a solution that can execute the jQuery selector expression in the isolated VM without complicating the handling of such selectors. Anyone can help me?

TheWisper commented 10 months ago

可能我跟你在做同样的事,但是我现在都没办法调试,你可以用isolated调试吗