MozillaZine

Javascript 1.5 Release Candidate

Sunday March 19th, 2000

Robert Ginda wrote in to tell us that Javascript 1.5 is now in the Release Candidate stage. Click here to read the newsgroup announcement.

If you are interested in the Javascript-in-C implementation (aka SpiderMonkey), you can click here to visit the SpiderMonkey page, or click here to download the tarball of the 1.5 RC SpiderMonkey code. Also be sure to check out the C Engine Embedder's Guide.

If you are interested in the Java implementation of the Javascript interpreter (aka Rhino, after the O'Reilly book), click here to visit the Rhino page, and here to download the zipped Rhino 1.5 RC package.

Javascript 1.5 is compliant with ECMA-262 revision 3. To read more, visit mozilla.org's Javascript 1.5 page.

#1 As Clear as Mud

by TonyG

Sunday March 19th, 2000 4:48 PM

I have made several abortive attempts at writing some DHTML for Mozilla. The stumbling block is knowing which version of Javascript and/or ECMAscript the lizard adheres to. Any pointers?

#2 Re: As Clear as Mud

by Ben_Goodger

Sunday March 19th, 2000 7:49 PM

erm.. 1.5, or just plain "JavaScript" will work fine (and is what is used internally).

You should be using the DOM for access to page elements, the version of JS is probably irrelevant

#3 Re: Re: As Clear as Mud

by spacecow

Sunday March 19th, 2000 8:34 PM

Umm, maybe I interpreted the message differently, but I thought he was asking which DOM it was that Javascript adhered to. I'm guessing it's the DOM as released by W3C, which is similar to (but, of course, not the same as) IE4+. For further info, find the release notes. I don't actually know, just guessing.

#4 All cleared up?

by sacolcor

Sunday March 19th, 2000 9:47 PM

Right you are...Mozilla uses the W3C DOM-1 spec, and parts of the DOM-2 spec. It does not include either IE DOM elements, or old Netscape 4.x DOM elements (except where they happen to match the W3C spec)

#5 Newsgroup announcement link bad n/t

by Kovu

Sunday March 19th, 2000 11:37 PM

n/t

#6 Works here (n/t)

by mozineAdmin

Monday March 20th, 2000 4:48 AM

#7 Link doesn't work for me, either (n/t)

by zontar

Monday March 20th, 2000 7:55 AM

n/t

#8 click here?

by riddley

Monday March 20th, 2000 8:05 AM

You can click here to do this

you can click here to do that

Didn't that style of web page go out in about 95?

#9 Re: click here?

by mykmelez

Monday March 20th, 2000 11:03 AM

No, riddley, this way of making links has never gone out of style, but it's worth mentioning again why it has never been considered the best way to do things:

When a user encounters a non-descriptive link (f.e. 'you can -click here- to visit the Rhino page' instead of 'you can -visit the Rhino page-') they must look elsewhere to figure out the target of the link and then back to the link to go to that target. This takes a miniscule amount of extra time and causes a very small amount of frustration, but the time and frustration are not insignificant, and they make reading a web page more difficult and less enjoyable than it needs to be.

The secondary problem is that a small link like '-here-' is more difficult to hit with the mouse, again necessitating extra time and frustrating precision. That's why in the example above I suggest making the words 'visit the Rhino page' a link instead of just 'Rhino page'.

#10 Stand-alone JS-Engine?

by KlausM

Monday March 20th, 2000 2:41 PM

It would be great to see a stand-alone JavaScript implementation, with a kind of module concept - similar to Perl. It would benefit from intrinsic Unicode support, more object oriented approach and much clearer syntax than Perl. Thinking of an XML parser and DOM module, it would be a great tool for automated web generation or as a replacement of Perl or PHP as a CGI script interpreter. Maybe Mozilla's JavaScript implementation is a good starting point for it.

#11 Re: Stand-alone JS-Engine?

by dveditz

Monday March 20th, 2000 9:57 PM

SpiderMonkey and Rhino are both stand-alone javascript engines, suitable for embedding in other projects such as Mozilla (alread done :-) ), web servers, etc.

Both engines are already being used in non-Mozilla, non-Netscape projects, in fact.

#12 Re: Re: Stand-alone JS-Engine?

by KlausM

Tuesday March 21st, 2000 2:38 AM

No, I don't meant a version that can be embedded into a browser, server or what ever (so far I understood this concept :-). I meant it as a stand-alone application, like the perl interpreter, e.g. that I can type in my shell:

>js helloworld.js

so that the file "helloworld.js" is loaded and executed, and after execution, the interpreter stops. This not only requires a simple wrapper around the embeddable engine, but also a (portable, system independant) library which gives access to system resources, e.g. file/directory/network access. Maybe this already exists, but I haven't seen anything like. If you know something like, please give me a pointer...

#13 Re: Stand-alone JS-Engine?

by rginda

Tuesday March 21st, 2000 5:46 PM

The js shell is here: http://lxr.mozilla.org/seamonkey/source/js/src/js.c

Alternatley, the xpcshell: http://lxr.mozilla.org/seamonkey/source/js/src/xpconnect/shell/xpcshell.cpp is a JavaScript shell with access to xpcom components, so you can create nsIFile objects, etc.

xpcshell is built by default in debug mozilla builds, while the js shell is only built with stand-alone js. Directions for building stand-alone JavaScript can be found on the spidermonkey page.

#14 Re: Stand-alone JS-Engine?

by dcrowley23

Tuesday May 25th, 2004 8:36 PM

I've been using spidermonkey... I'm interested in reading XML using DOM, but in my own project... not Mozilla. I have spider monkey embedded already. Is there a DOM implementation I can include? (or is it already included, and I'm too ignorant to find it?)