It appears as though this code only works for unix systems. Is it
possible to add support for stdin in Windows? I'm running Windows
Server 2008 R2 and would like to be able to read from stdin using
PhantomJS in Windows.
I also found this pull request on Github:
https://github.com/jontuk/phantomjs/commit/c68ef82eb679feb87812e58a1d12546cbfd7b0ff
From this pull request, what would be some example code to use
getStdinLine()? Can this be invoked directly from the javascript API?
Thanks much.
--
Ariya Hidayat, http://ariya.ofilabs.com
You are not missing anything. It does not work because it's not implemented yet.
var system = require('system'); system.stdout.write('enter password: '); var password = system.stdin.readLine(); system.stdout.write("password: " + password);