3 ms·
It would be better to handle your errors through try{}catch{} rather than using phantom's onError as an exception seems to force an exit. https://github.com/so
by syncerr 11y ago
It would be better to handle your errors through try{}catch{} rather than using phantom's onError as an exception seems to force an exit.
https://github.com/sotownsend/BooJS/blob/master/lib/boojs.rb#L39 https://github.com/sotownsend/BooJS/blob/master/lib/boojs.rb...
I threw together a similar implementation in bash with this change:
https://gist.github.com/spence/30d5aa383fec6be8e51e https://gist.github.com/spence/30d5aa383fec6be8e51e
Looks like
./phantomjs-repl.sh
> missing
ReferenceError: Can't find variable: missing
> window
[object Window]
> console.log('Hello')
Hello
undefined
> !jquery-1.11.2.min.js
Loading jquery-1.11.2.min.js ... done
> $('<span>Hello</span>').text()
Hello
> ^C