2 ms·
Yes I know that, but what if all you want is just to execute the JavaScript on a page?
by elorant 10y ago
Yes I know that, but what if all you want is just to execute the JavaScript on a page?
- rpeden 10y agoThe catch is that usually, the JavaScript is on a page because it interacts with the page in some way. So without a DOM, executing the page's JS likely won't work. Having said that: if you just want a headless V8 VM, Node.js is what you're looking for. You can even use jsdom there to simulate a web page if the JS you're trying to run requires it. If you're looking for headless Chrome/Chromium (which includes V8), try nightmareJS. Neither Node nor nightmare include V8 5.4, but they will in the relatively near future.