How to load nodejs module in PyV8?

How to load nodejs module in PyV8?

I read all about how big jsdom is when starting with nodejs. Will I get the same benefits as with the move if I ran v8 inside a Python application and python “received” web resources and then provided returned html strings to the v8 instance that loaded jsdom inside

(or is this a pointless configuration for some reason that I haven't thought about yet?)

0
source share
1 answer

I am afraid this is not possible since jsdom requires some node constructs that are not available in vanilla v8. Things like require, core libraries and the window sandbox method will require a bit of work to get out of jsdom.

You can take a look at https://github.com/andreasgal/dom.js/

+2
source

Source: https://habr.com/ru/post/1536705/


All Articles