Execute a script in phantomjs interactive (REPL) m

2019-01-26 21:11发布

This question already has an answer here:

I have a file that runs and prints output to the screen when I run it in phantomjs non-interactive mode

$ phantomjs file.js
<stuff printed to screen>

In phantonjs interactive (REPL) mode is there a way to run a js file, something like run('file.js'). I want to open up phantomjs as a pipe and send it multiple files to execute before closing the pipe to save on startup overhead.

1条回答
在下西门庆
2楼-- · 2019-01-26 21:54

Looks like REPL mode is borked and and an overhaul is underway:

https://github.com/ariya/phantomjs/issues/11180

查看更多
登录 后发表回答