Hi Tobie and toxcct,
> This is definitely planned for 2.0.
Good news! Looking forward to this then. Probably the best way would
be to adapt the build process: Building two different files from the
sources - one for the batch / server side context, and another one for
the browser context. This variant would be better than having one
"prototype.js" with lots of conditionals that have to be executed at
runtime.
>really exciting server side JS frameworks (node.js, narwhal, ringo, etc.).
I will have a look at those, thanks for the info.
@toxcct:
>Are you sure you are using "Javascript" precisely ?
>Aren't you using some kind of ECMAScript instead ?
Well, my scripts are executed with the same library (%systemroot%
\system32\jscript.dll) that is used by the Internet Explorer for
script execution. The only difference is that there is no browser
around and hence no global "window" object, no "document" etc.
Instead, i execute the JS files with the "cscript" command.
You ask which kind of ECMAScript I am using. For me, it is of no
practical use to classify the capabilities of this jscript.dll. It is
sufficient that it understands the ECMA script standard as a subset of
its language scope. Indeed, I can execute my script in Google Chrome,
in Firefox and in IE, as it only uses the ECMAScript core which is
understood by all these user agents. The point is that I don't want to
run the script in a browser. I want to start it as a batch file with
no UI. And the question was about whether I still could use the nice
language enhancements provided by prototype even in this context. This
has been answered by Tobie now.
Thanks and regards,
Rüdiger