Custom initialization scripts, defined by the environment.
Get all files that are passed to VM (libraries and code)
Get files that are a library (i.e.
VM arguments excluding executable.
PhantomJS doesn't support Function.prototype.bind.
pipe lines from input stream to JSConsole
Pipe stdin and stdout from/to VM
send a bunch of JS files to a writer
send a bunch of JS files to an output stream
Sends required data to VM Stdin (can throw)
Wait for the VM to terminate, verify exit code
In phantom.js, we include JS using HTML