On Fri, 22 Oct 2004 10:56:26 +0200, VK <sc**********@yahoo.com> wrote:
ECMAScript makes no assumptions as to the environment in which it runs.
But it should.
No, it shouldn't. It is a scripting language with applications outside of
browsers, so there cannot be any assumptions about the environment.
It never pretended on the Java's WORA slogan, so this pharossy is
escaping my understanding.
Pharossy?
[snip]
By the way, you never know what might be added in future as ECMAScript >
Why it is not done now?
Because there's no need. If the precondition can be evaluated on the
server, it can insert the required script. If not, a script replace
functions at runtime to adapt to its environment. That, in fact, provides
more functionality. Preprocessing instructions are executed at parse-time,
which may not be an appropriate moment to evaluate the environment, so
again, I fail to see the need.
[snip]
At the very least, that last part should be changed to:
'<\/src' + 'ipt>'
... and so on: thank you for an illustration of how ugly the current
situation is with the pseudo-precompiled instructions.
The correction had nothing to do with the "current situation", as you see
it. Escaping the backslash should be done with *every* closing tag, not
just closing SCRIPT tags. Perhaps you should read
<URL:http://www.w3.org/TR/html4/appendix/notes.html#h-B.3.2>. Of course,
this only applies within a HTML document. If the script is in an external
file, there's no problem.
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.