phantomjs/examples/arguments.coffee

7 lines
173 B
CoffeeScript
Raw Normal View History

if phantom.args.length is 0
2011-05-29 16:21:25 +04:00
console.log 'Try to pass some args when invoking this script!'
else
2011-05-29 16:21:25 +04:00
for arg, i in phantom.args
console.log i + ': ' + arg
phantom.exit()