MozillaZine

Javascript 1.5 goes Beta!

Wednesday January 12th, 2000

Javascript 1.5 has reached beta, and you can test it out in Mozilla now. You can read more about Javascript in Mozilla here, and the 1.5 announcement here. The announcement page also has links to discussions going on in the jseng newsgroup regarding some of the new features.

So, what's new? Well, some ECMA-262, revision 3 changes: Conditional function declaration, runtime errors reported as exceptions, and regular expression enhancements. Also, multiple catch clauses, getters and setters, catch keyword, and "strict" mode. Lots of info in the announcement page, so check it out!


#12 Re: What's the story with old-school Javascript st

by rginda

Friday January 14th, 2000 2:50 PM

You are replying to this message

Unfortunately many pages are written under the assumption that users will have *EITHER* NS4 or IE4, your example <http://www.php.net> is one of them. The page checks which browser is in use by looking for DOMisms, in the following snippet:

NS4 = (document.layers) ? 1 : 0; IE4 = (document.all) ? 1 : 0; ver4 = (NS4 || IE4) ? 1 : 0;

In Mozilla, all three of these vars will be 0, which should leave the page completely static. However, the rest of the script in this page *assumes* that if NS4 is 0, IE4 must be 1. <http://bugzilla.mozilla.org/show_bug.cgi?id=22517> is another example of a highly visible page with broken JavaScript. Erick Krock has put together a browser detection page with more information on the subject, it is available at <http://developer.netscape…/viewsource/krock_v5.html> .

I'm not sure what you mean by "I can't seem to get layers ... to pop-up", but perhaps the (mozilla only) example at <http://www.netcom.com/~rg…js_examples/divpopup.html> will help.

Rob.