phantomjs/examples/arguments.coffee

7 lines
173 B
CoffeeScript

if phantom.args.length is 0
console.log 'Try to pass some args when invoking this script!'
else
for arg, i in phantom.args
console.log i + ': ' + arg
phantom.exit()