Wrong. JScript is Microsoft's implementation of ECMAScript. JavaScript is
Netscape's/Mozilla.org's implementation of ECMAScript. Those are similar,
but different languages. Read the FAQ.
Well, IIRC (not reading the faq again, many years since I last did and
am too lazy, but strangely not too lazy to post here) ECMAScript was
the standardisation of JavaScript, the earlier versions of JScript was
a reverse engineered JavaScript and the different name was not so much
because it was a different language but because of various legal
issues surrounding the name (I don't think this is mentioned in the
FAQ), the reverse engineering was done because MS was behind in the
browser war. When the ECMA standardization started MS tried to follow
and I thought that basically the version in IE 6+ (and thus in WScript
on a computer with IE 6+ installed) was ECMA-262 version 3 compatible.
My understanding that the main inconsistencies were in the
implementation of other standards with which the language interacts in
the browser, the DOM, CSS etc. I suppose there probably are going to
be some inconsistencies but I think those inconsistencies would
probably turn out to be things I would classify as pedantry, and
probably most people would agree. But hey, I could also be wrong.
I can think of some specific non-browser specific scripting examples
that should probably make it in, [...]
The Windows Script Host is somewhat browser-specific itself, as it supports
only Microsoft JScript as ECMAScript implementation (like IE). So there is
little point of excluding other code from it.
I meant specifically JavaScript code that runs in the browser and
JavaScript that runs in every JavaScript implementation.
You have yet to understand that you are dealing with different programming
languages and different runtime environments here as indicated by my
previous comment.
Well I guess that's true, as I don't understand I am dealing with
different programming languages I understand rather that I am
discussing bringing the kind of library type functionality that one
sees in the main environment for JavaScript, the browser, to a
somewhat less well known environment, The Windows Scripting Host.
alert() is a method of a host object provided by the AOM of the HTML UA,
usually a Window object. It is not a feature of the programming language.
I think you may be saying tomato and I may be saying tomatoe here.
When I said native function I meant something implemented in the
JavaScript environment as a function accessible by the language but
not a JavaScript function itself, although the type of alert in IE
only returns object which doesn't say much, while in FireFox you can
interact a bit more with alert than you can in IE:
Object.prototype.describe=function(){alert("Description: " +
this);return this;}
alert.describe();
which gives
Description: function alert(){
[native code]
}
which is why I used the term native function to describe it. I'm sorry
if I should have avoided that term.
As WScript provides another API than an HTML UA.
In a sense.
yes, in a sense. perhaps I should have used the word analogue instead
of version.
how where the following things misconceptions exactly:
1. the code that I provided works in WScript and apparently the way I
described. If I create an object then with this code I can loop over
its properties and make WScript.Echos of them, or as I called them in
my function alerts.
2. I suggested in the second paragraph that perhaps I had used the
wrong term for JavaScript that runs in different environments than the
browser when I used the term browser agnostic. IF this is a
misconception are you suggesting either that there is no such thing as
JavaScript that runs outside the browser or are you suggesting that
browser agnostic was a brilliant term and it is a misconception to
consider changing it. In which case, thanks!
3. The last paragraph I state I am somewhat an odd case because I have
spent very little time with JavaScript in the browser and that was
many years ago - basically with IE 5 and Netscape 4 as the main
browsers, although I have done quite a bit on the server in various
implementations - I realize that I mention some versions of the
language that you may describe as not different versions of the
language but different languages altogether (true about JScript.Net
dependent on .NET compatibility settings) was that the misconception?
Please learn to understand what you are doing before you can do further harm.
Well, I suppose that anything I did would not be of great harm,
because it would be limited to the Windows Scripting Host.
Thanks