View Full Version : JavaScript, 1.1, 1.2 differences
What are the differences among languages JavaScript, JavaScript 1.1, and 1.2, etc.
mordred
10-05-2002, 01:58 PM
Those languages are all JavaScript, and those with numbers prepended refer to certain versions of this language. With each versions new aspects/features were introduced into JavaScript, e.g. arrays are known since JS1.1, and regular expressions shipped with JS1.2, exceptions with JS1.5.
Currently the most recent one is JavaScript1.5. Some folks are working on JavaScript 2, which basically is also ECMAScript 4, which refers to the standardized description of that scripting language.
See here for a short comparison of the JS versions to ECMAScript:
http://devedge.netscape.com/library/manuals/2000/javascript/1.5/guide/intro.html#1013654
The JS2.0 working draft:
http://www.mozilla.org/js/language/es4/index.html
...if that leaves you confused, just ask again. ;)
Thx.
Also worry about browser competibility. Do the versions of JavaScript have different browser competibility, some versions are with more competible browsers than others?
mordred
10-05-2002, 04:10 PM
Different browsers support different versions of JavaScript. For Netscape, you can find info here:
http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/preface.html#1003515
The most modern browsers support JS1.5. But each has of course its own misimplementations and other insufficiencies. Also, remember that what is defined by these JavaScript versions is only the core concept of the language - what objects are, what string manipulation functions are provided, how control statements should look like etc. Features like the DOM or the host environment are not defined in those standards!
Microsoft provides its own (more or less) ECMAScript-compatible JavaScript implementation called JScript. Search on msdn.com for further info about that.
Originally posted by mordred
The most modern browsers support JS1.5
IE6 doesn't.
mordred
10-05-2002, 06:04 PM
I spoke of modern browsers, not proprietary HTML munchers.... hehe ;). Can you be more specific, as to which features of the JavaScript1.5 core are not supported by IE6?
Getters and setters for one:
http://devedge.netscape.com/library/manuals/2000/javascript/1.5/guide/obj.html#1018325
Though the syntax there is deprecated....
use objectInstance.__defineGetter__(propname, functionReference);
and
objectInstance.__defineSetter__(propname, functionReference);
It still doesn't support watch() and unwatch() methods of an Object, and there are some discrepancies in the RegExp object. (re('bla') should do the same as re.exec('bla'), but it doesn't in IE).
This is among other things, but to me the most inconvenient.
mordred
10-06-2002, 04:16 PM
Ah! I understand now.
So I rephrase my statement above that "most modern browsers support a core JavaScript based on the standardized ECMAScript version 3". In the mentioned ECMAScript document I couldn't find any reference to getter/setters and watch() methods, so I guess that Microsoft took this as a blueprint for their JScript implementation and not Netscapes proprietary JavaScript version (since it also arrived later then ECMAScript v3).
Don't get the impression I'm very fond of IE's incapabilities, I'm just playing a little advocatus diaboli. ;)
Originally posted by mordred
so I guess that Microsoft took this as a blueprint for their JScript implementation and not Netscapes proprietary JavaScript version (since it also arrived later then ECMAScript v3).
Don't get the impression I'm very fond of IE's incapabilities, I'm just playing a little advocatus diaboli. ;)
Sure. Netscape created Javascript, ECMA standardized it. Netscape's implementation now doubles as a way to testing out features considered to be added. For example, in Javascript 2.0, it states right in the specs that several of the features will not be in the corresponding ECMAscript, but may appear in a revision soon if it is found to be useful.
Mhtml
10-07-2002, 03:53 AM
Question, if netscrap created javascript is that why when nnav had an error it popped up in a new window?
NS 3.0 I have, I used to use it for testing and when it got script errors windows popped up with javascript powering them.
Did IE ever have a similar thing?
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.