[webkit-dev] KJS Test Program

Eric Seidel eric at webkit.org
Fri Feb 22 00:53:10 PST 2008


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 <bfulgham at gmail.com> wrote:
> Is it possible to pass command line arguments to a Javascript program
>  on the command line?
>
>  E.g.,:
>
>  brent at hopper:/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
>  brent at hopper:/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: --
>  brent at hopper:/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
>  webkit-dev at lists.webkit.org
>  http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>


More information about the webkit-dev mailing list