It is not possible to do this today.

However it would be neat to add such to testkjs.  We've talked about
renaming testkjs to something like jscshell or jsshell or js.
Starting to add things like argument handling might be further
justification for renaming it to a name that would make sense were it
ever installed as a js interpreter in some linux distro. :)

On Thu, Feb 21, 2008 at 11:01 PM, Brent Fulgham <[EMAIL PROTECTED]> wrote:
> Is it possible to pass command line arguments to a Javascript program
>  on the command line?
>
>  E.g.,:
>
>  [EMAIL PROTECTED]:/opt/shootout/shootout/bench/nsieve$ /opt/local/bin/
>  testkjs nsieve.kjs 3
>  [9074] nsieve.kjs line 32: ReferenceError: Can't find variable:
>  arguments
>  Could not open file: 3
>  [EMAIL PROTECTED]:/opt/shootout/shootout/bench/nsieve$ /opt/local/bin/
>  testkjs nsieve.kjs -- 3
>  [9076] nsieve.kjs line 32: ReferenceError: Can't find variable:
>  arguments
>  Could not open file: --
>  [EMAIL PROTECTED]:/opt/shootout/shootout/bench/nsieve$
>
>  Looking over the 'testkjs.cpp' sources, it doesn't appear that you can
>  pass arguments to the javascript program.
>
>  Is there some way to do so?  Or should I modify the testkjs.cpp
>  sources to add the ability to do this?
>
>  Thanks,
>
>  -Brent
>
>
>  _______________________________________________
>  webkit-dev mailing list
>  [email protected]
>  http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to