No, PhantomJS is a complete standalone browser. If you like to compile PhantomJS with emscripten in JavaScript and then run it in a browser, you can try, but it will probably be difficult to do.
The easiest way is to start the PhantomJS server, which accepts the HTML code to be displayed and returns the resulting PDF file. For this PhantomJS provides a web server . Of course, you can use PhantomJS with the appropriate node.js server through a bridge, such as phantom .
source share