PhantomJS Exit Doesn’t Exit Where You Expect It To Exit
April 19, 2013
Posted by on
Here’s a little trick using PhantomJS 1.9:
var system = require('system');
system.stdout.writeLine( "This is printed after exit!" );
Here’s what it does – it prints out:
This is printed after exit!
This doesn’t happen if you use the console.log() function but it does with the system.stdout and system.stderr objects.