Login:
Password:

Firefox 2.0 to Feature New JavaScript 1.7

By Scott M. Fulton, III, BetaNews

October 14, 2006, 12:55 PM

Despite some indications to the contrary this week, the Mozilla Foundation did not release its next version of the Firefox browser, which is still being widely, publicly tested under Release Candidate 2. As Mozilla's vice president for engineering, Mike Schroepfer, told BetaNews on Friday, Firefox releases take place on a qualitative basis, not on a deadline or time scale. The organization will release the next production version of the browser when it feels it's ready for prime time.

One of the new browser's key elements, and perhaps the beneficiary of the greatest amount of change, is its new JavaScript interpreter. As more Web sites take advantage of the new benefits of Asynchronous JavaScript -- especially as they embed objects or functionality from Google and Microsoft Windows Live -- the JavaScript interpreter may play a much more active role, not only in the operation of the browser but in the implementation of Web-based applications.

With many in the original JavaScript development team from Netscape now working with Mozilla -- including Brendan Eich, JavaScript's creator and Mozilla's CTO -- the developers of Firefox 2.0 see an opportunity to propagate the component that could replace the HTML rendering engine as the Web's most prominent and influential component.

Developers are now starting to formalize additions to the JavaScript language to be rolled out with version 1.7 of the interpreter, which will premiere on the world's Web stage the day Firefox 2.0 is released.

"If you look at Firefox in general, the JavaScript engine is one of the really shining examples of the platform," Schroepfer remarked. "It's one of the reasons why Web developers prefer it, because it's very fast for most operations, it's very compliant, it's one of the most widely used JavaScript engines out there."

As he reminded us, not only does Firefox' JavaScript engine execute embedded scripts in Web pages (including AJAX scripts), but it also executes client-side code for use in Firefox extensions, which are embedded directly into the browser.

For that reason, the upgrade of the interpreter to version 1.7 will be of prime importance, especially as JavaScript begins to take on more of the programming features of newer, compelling scripting languages such as Python and Ruby. "JavaScript 1.7...implements a whole host of new features that were really inspired by the takeoff of other languages that have become popular, like Python and Ruby," stated Schroepfer, "so we take the JavaScript language to that next level."

Python has proven to be perhaps the tightest and most adaptable general purpose scripting language thus far developed, although Perl and PHP continue to have substantial followings. As JavaScript takes on more Python-like features, Firefox developers may be compelled not only to redefine the Web page, but also to build onto the browser itself.

"I think what we focused on in [upgrading] the core platform," Schroepfer said, "was, how do we put the right core primitives in the main platform to make Firefox both a great development platform and a great platform for end users to use, and then how do we leverage the extensibility of that platform through extensions to let developers effectively write their own tools that they need to write, in order to build these vast, distributed Web-based applications?"

On the programming level, one example of the changes JavaScript developers will see is with two new features that other scripting languages have made good use of, called generators and iterators. One example shows the use of a re-iterative loop that generates the first 100 numbers in the famous Fibonacci sequence (which was used as a benchmark back in the days when "microcomputers" were slower).

In typical JavaScript construction, for the loop to report its progress with each iteration, it would have to invoke a callback function that steps execution outside the loop clause, so that it could perform a document.write instruction each time.

With generators and iterators instead, a variable can be declared and assigned the function containing the reiterative loop as its "value." Here, the variable acts more like an object. The loop clause that counts the first numbers in the sequence exists outside the function, so the main body of the program has control over how many times the function is entered.

Execution steps into the function for one round -- one iteration -- by means of the .next method, which acts as the iterator. The function "knows" it's being used for multiple iterations, even though it doesn't maintain the loop. It gracefully passes execution back to the main body, which has the loop, by means of the all-new yield statement. This is the generator.

As Schroepfer told BetaNews, JavaScript 1.7 is an interim build, a "check point" on the way to finally implementing JavaScript 2.0, which is based on (actually a superset of) the ECMAscript 4.0 proposal that Netscape made to the ECMA standards body in 2003, and which incorporates Macromedia's (now Adobe's) ActionScript 2.0.

"Firefox 2.0, and the release of JavaScript 1.7, [comprise] the first kind of checkpoint along that path, where we're adding things like array comprehension, some Let expressions and iterator expressions that people are used to in the Python syntax, to make it easier to do things like loop over an array of elements and apply something to them - a very common operation on the Web."

Schroepfer added that, just like every other Mozilla project, the production of JavaScript 1.7 and 2.0 are taking place out in the open, in full cooperation with not only the ECMA working group but also with major implementers of JavaScript including Adobe, Google, and Microsoft.

BetaNews will feature more with Mike Schroepfer and more of the new under-the-hood features of Firefox 2.0 as its release approaches.

Add a Comment (48 Comments)

BetaNews reserves the right to remove any comment at any time for any reason. Please keep your responses appropriate and on topic. Foul language and personal attacks will not be tolerated.

Name (required):

E-mail (required):

Enter Your Comment:

By ds0934

posted Oct 16, 2006 - 10:59 PM

Wow. Nightly (trunk) builds for "3.0a" is a real "mine field" indeed (ha ha). I've tried two in a row with wildly different results. Flaky in some areas. But oh well. As for 2.0, it seems pretty solid, but not much better than IE7 in terms of basic features. Many of the banking sites (and our company timesheet) still only work with IE so until those sites come around, I'm kind of stuck anyway. Even Opera doesn't render them properly, which isn't Opera or FF's fault. It's crappy web coding. Sigh.

Score: 0

By mjm01010101

posted Oct 17, 2006 - 1:01 AM

I would ditch any bank or Credit Card that doesn't support FF. I've never seen it personally. All bill payments, etc can be made.

Sadly our internal payroll app is IE only, and wasn't my decision or I would have nixed it.

Score: 0

By crashoverride

posted Oct 16, 2006 - 3:17 PM

I'm seriously no seeing this memory usage problem. As of right now IE7 is using more memory than Firefox2 with 27 extensions installed.

Score: 0

By anmol.2k4

posted Oct 17, 2006 - 6:55 AM

but then with ~30 tabs open with m2 running with 3 different accounts checking for mail every 10 minutes and on bittorrent downloading opensuse image and irc client is also working.
Tried to compare that with firefox(clean without addons) with 30 tabs open, ff still using DOUBLE the amount of memory.
With site compatibility problems GONE (live.com, yahoo mail beta) Opera is looking far superior in all browser on any scale.

p.s. im using both on debian etch.

Score: 0

By anmol.2k4

posted Oct 16, 2006 - 9:45 AM

What happened to firefox, really what are these ppl doing these days.
are they involved in just counting the money they get from integrated google search.
sad sad 2.0 could have made me dump opera but i guess that wont happen anymore.
With opera 10 coming soon even 3.0 will not look that good.
They cannot tout about security neither about speed and we are not dumb enough to believe that that memory leaks is a *feature*.
I left opera for few days to try out every new extension out there but then gave it up to go back to opera with features that does not break with every new version/update.
What i don't get is the market share of opera is it the name or is it that ppl get too overwhelmed by all the features.
Even version 2 is not that big of an improvement over 1.5 and now they are planning 3. i guess we will get a better side bar in version 5 ;p

Score: 0

By uberfly

posted Oct 16, 2006 - 11:02 PM

I can't say enough good things about Opera either. I think the reason ppl might run from it is that it is a bit of a departure from their familiar comfort zone. I mean look at firefox - you install it and it basically takes the place of IE in look and feel. It's like IE's twin brother by default.

I like firefox but its memory issues really bug me. It def does bog for me.

Score: 0

By anmol.2k4

posted Oct 17, 2006 - 6:35 AM

so what is soo hard to understand ?
those round edges of tabs, or the menu bar or the back/forward/refresh//stop buttons.
or you may be talking about that side-bar.
or is it the color scheme, but if im right firefox dont have the same color scheme as the one in IE, still i dont remember as im soo used to orange these days ;p.
And also there is an option to make opera change color scheme , and also you can make it use the windows or other OS's default themes.
And if there is some thing i mean ANYTHING you dont like (even menu bar) you can remove it with little fuss , just third click on that thing and click on remove (for menu bar and scroll bar you need to go to a site and drag drop button in opera and click on em).

Score: 0

By Frostek

posted Oct 16, 2006 - 1:09 PM

I'm so tired about hearing about these supposed memory leaks.

Firstly, it's not one bug which Mozilla won't fix, as some people have said. It's a number of small bugs which cumulatively cause memory leaks for *some* people's setup. Very difficult to reproduce if you can't get it to happen. I myself have never seen it and I've been using it since 0.6. Every new version mentions fixing some of these bugs in the changelog, so it can't be half as bad as you make out.

Secondly, the "feature" bit you make reference to can be disabled. The fix is well documented on the net.

Thirdly, the other memory leaks are down to errors within some extensions (also documented so you can avoid them if you want to). The extensions are written by third parties -so what would you expect Mozilla to have to do with that?

Score: 0

By avalancheImarket

edited Apr 6, 2007 - 12:37 PM

The only people that don't seem to have a problem with the memory leak are coders. I have my task manager open and I'm watching the memory climb into the stratosphere. I'd say I'm surprised that such a smart group of people would be so stubborn about fixing a problem that's as plain as the noses on their faces, but getting programmers to fix just about anything without sheer force is a pain. Guess we're getting what we pay for...

Score: 0

By anmol.2k4

edited Oct 17, 2006 - 7:06 AM

So lets blame the extension, but wait isn't the same thing you ff lovers tout about soo much. Extensions increases memory leaks / security vulnerability and they break with almost every new ff build.

Score: 0

By PC_Tool

posted Oct 17, 2006 - 9:13 AM

Some extensions are very well designed and work beautifully. So much so that they feel like they were built into the browser itself. that's how they should be.

Some don't. Some are broken, some break others, some simply don't work.

This kind of thing happens when development is open to *anyone*. It's a good thing.

As with any software, if you're an idiot, you're screwed. In other words, you're screwed, man. ;)

Score: 0

By anmol.2k4

edited Oct 17, 2006 - 10:19 AM

weird i was not able to post the whole comment, even though i tried many times.
But why am I screwed ?
I was just saying that not only extension end up bloating browser, they often break and that is bad for those who dont use windows & osx, makes browser vulnerable are not reliable etc etc.
With a full functional mail programme and a simple irc ,widgeting engine and bittorrent and a LOT superior popup blocker all this and still less hungry on CPU time and memory, Opera is ahead as of now.
All this have never broken on any version Opera i have tried.
Idiot i may be but i use opera !=ff, am i still Screwed ?

Score: 0

By morriscox

posted Oct 17, 2006 - 11:41 AM

So since some extensions cause problems with Firefox, it's better to not allow any extensions? No thanks. I like the choice.

Score: 0

By flake

posted Oct 16, 2006 - 2:35 PM

I don't what you think you're saying about "hard to reproduce." Just open up any Moz foundation browser, load up a few tabs, using it to do all your browsing. Visit gmail, slashdot, digg, the inquirer and maybe for fun, myspace, okcupid, the beta yahoo mail and yahoo 360. Don't shut the browser for several days. Notice after a week that the POS is using a quarter gig of ram or even much more which can not be free()'ed without closing the browser.

I don't use any extentions at all and must restart the browser at least once a week ALL THE TIME to avoid bogging my machine. It's not a bad browser, but to say this isn't a problem is f'ing bull!

Score: 0

By Arakiel

edited Oct 16, 2006 - 11:19 PM

Let me get this straight...the leak is small enough that you dont have a major problem with it until you've been running a single browser session for a WEEK and this is a big problem to you? Are you serious? Thats retarded, close your freakin browser once and awhile, you'll never notice.

Score: 0

By Desides

posted Oct 16, 2006 - 6:38 PM

"Don't shut the browser for several days."

There's your problem. Why on Earth would you NOT close the browser once in a while? 2.0 has session saving. Enable it, close the damn thing occasionally.

Score: 0

By PC_Tool

posted Oct 16, 2006 - 3:18 PM

lmao...

At least once a week = all the time?

Wow.

Score: 0

By RootWebGod

posted Oct 16, 2006 - 10:06 PM

I thought your taking that out of context was a little funny, but I actually agree with him ("flake"). :)

I, on the other hand, unlike flake, use several tens of extensions and will gladly keep Firefox running for a few days at a time, but even with these I am quite grateful to have noticed significant improvement with the Firefox 2 Release Candidates over the Firefox 1.5 branch.

One thing I am doing now though, is letting the major releases (i.e. Firefox 2) disable all extensions that it reports are not compatible with exception to my utmost favorite or otherwise essential extensions.

Score: 0

By dvferret

posted Oct 16, 2006 - 8:58 PM

LOL.

Yah, I think that problem could be easily solved.

Score: 0

By alecmg

edited Oct 16, 2006 - 2:57 AM

Oh, right, Frefox is extensible.. now it whole different way... but do I want that? I spend under 10 minutes setting up Opera to my liking after fresh install. To find and install extensions that give at least same functionality as Opera 9 has... may be impossible. Certainly memory usage isn't a problem nowadays as long as it works fast. And Opera does work fast :)
Firefox has the edge in spread - you can find it in every cafe or linux desktop now. New IE...

Score: 0

By DaveBG

posted Oct 16, 2006 - 3:28 AM

If it just could start faster and usle less RAM i would use it. But since it dont, me dont too :)

Score: 0

By c4p0ne

edited Oct 15, 2006 - 4:37 PM

Already using Firefox v3.0 Alpha 1 here. Stable as f*ck so far. Unbelievable and apparently, a tremendous undertaking has taken place in the sorely needed area of memory management. It's f*cking fast and uses noticeably less memory even in Alpha stage..

As always I don't think anyone ever recommends using "alpha/beta" software in production environments, but for those who would like to try it out, Firefox v3.0 is code-named "Minefield" and a convenient link to it is here:

http://ftp.mozilla.org/p...-US.win32.installer.exe

Score: 0

By ds0934

posted Oct 15, 2006 - 6:57 PM

I've searched all over the mozilla web site and ftp folders. Where can I download 3.0 alpha from?

Score: 0

By Desides

posted Oct 16, 2006 - 1:24 AM

You can't. There is no 3.0 alpha. There are nightly trunk builds which will, when branched, become the 3.0 series. People claiming that they're using 3.0 alpha builds have no clue what they're talking about.

You can get nightly builds here:

https://ftp.mozilla.org/...lla.org/firefox/nightly/

Score: 0

By c4p0ne

edited Oct 16, 2006 - 6:09 AM

Thats pretty funny considering I have a direct LINK to it in my first post in this thread. Trunk builds or not, its an alpha version and it's 3.0 and it's even labeled as-such "3.0a". As I said it's an alpha build (not even in beta yet) but nonetheless *3.0 alpha*.

Another thing I like is that even their alpha builds now automatically update themselves to later alpha/nightly builds so you don't have to keep manually ftp'ing nightlies all the time. I bet this thing will auto-update itself all the way to the first "final" version of 3.0. :)

FF = the best. IE + ActiveX = sh*t.

::edit::

If they really wanna get serious about speed and fixing leaks, they should read some books by Kris Kaspersky on optimization / memory management. That guy's a f'ing guru.. But then again Russians programmers are usually better then their Chinese counterparts and as of late, far superior to their American counterparts.

Score: 0

By Desides

posted Oct 16, 2006 - 6:40 PM

"Trunk builds or not, its an alpha version and it's 3.0 and it's even labeled as-such "3.0a"."

I am so, so tired of this misconception. Betanews goofs this up too, which is why their download listings for Firefox are occasionally in error.

MOZILLA BRANDS THEIR PRODUCTS FAR AHEAD OF TIME. The "3.0 alpha" you're using is NOT the actual 3.0 alpha, but merely labeled that way in the About Mozilla window simply because it's easier to do it ahead of time and focus on actually fixing bugs.

Is it confusing? Yes. But there's good reason for it, and they aren't going to stop.

You are not using 3.0 alpha. You are using a nightly build from the trunk which will eventually become 3.0.

Score: 0

By PC_Tool

posted Oct 17, 2006 - 9:10 AM

You are using a nightly build from the trunk which will eventually become 3.0.

So it's an alpha of an alpha?

Is there really a big difference here, or are you simply picking nits?

Score: 0

By c4p0ne

posted Oct 17, 2006 - 6:48 AM

Fine. So we'll just say we're using v3.0 "pre-alpha". Since they brand their builds ahead-of-time, I'm going to brand my comments ahead of time as well. I'm using Firefox v3.0 Alpha, which will eventually, actually become Firefox v3.0. Or if everyone prefers I can just complicate things by saying, I'm running Minefield which will eventually become v3.0 Alpha, then Beta, Then RC1,2,3, etc..

I mean if it's going to become v3.0 anyway, it may as well really be v3.0 alpha. Thats why their branding things ahead of time. How can you differentiate a trunk build from an actual alpha anyway? Wait for them to tell you? In essence this may as well be an "early alpha" as we can see features from 3.0 are slowly starting to be incorporated.

well anyway.. it f*cking rocks. And with nightly tester tools most "incompatible" extensions WORK in this too! :)

Score: 0

By Desides

posted Oct 17, 2006 - 8:38 AM

"I mean if it's going to become v3.0 anyway, it may as well really be v3.0 alpha."

So we might as well call all 2006 model cars 2007 models, since they're all eventually going to be 2007 models, right? Horrible reasoning.

"How can you differentiate a trunk build from an actual alpha anyway? Wait for them to tell you?"

Pretty much. A build is officially alpha, beta, RC, or final when a labeled folder on the Mozilla FTP is created and files are available to download inside that folder.

Score: 0

By Arakiel

posted Oct 17, 2006 - 1:40 PM

"So we might as well call all 2006 model cars 2007 models, since they're all eventually going to be 2007 models, right? Horrible reasoning."

Your analogy is flawed, 2006 cars do not have the beginnings of improvements that are being made for the next model year. 301a, does.

"A build is officially alpha, beta, RC, or final when a labeled folder on the Mozilla FTP is created and files are available to download inside that folder."

OR when they brand it, which they have. Are you arguing about this because your really that anal retentive or are you just looking for something to sound all important about.

Score: 0

By dvferret

posted Oct 16, 2006 - 8:59 PM

Yah, took me awhile to figure that out but I figured that out back before 1.5 was released.

Score: 0

By Mark Gillespie

edited Oct 15, 2006 - 6:26 PM

Been playing with Firefix 3,0 alpha, seems alot faster than the bogged down Firefox 2.0. Javascript is particularly improved, it's now almost as fast as Opera 9 in Javascript benchmarks.

However, I can't see any reason to want to switch from Opera 9. Memory useage is slightly lower than Opera 9.02 but that gives me a mail client included, and to get the functionality I want and Opera provides, then I needs lots of plugins, which will swell memmory useage considerably.

I can't see any major new features to warrent a full 1.0 version number increase. For example, no Sessions and session saving, no tab undelete. It's still an Alpha, so I would imagine more stuff to come. It also leaks memory quite badly, but it's an Alpha, and i'm sure Mozilla will sort these.

Score: 0

By Desides

edited Oct 16, 2006 - 1:25 AM

"For example, no Sessions and session saving, no tab undelete."

Session saving is in. Tools -> Options -> Main tab: "When Firefox Starts" dropdown menu.

I'm glad you like Opera so much, but is there a reason to continue to bash Firefox? You don't like it, we get it.

"Been playing with Firefix 3,0 alpha"

There is no Firefox 3.0 alpha. You're using a nightly trunk build.

Score: 0

By Mark Gillespie

edited Oct 16, 2006 - 11:57 AM

I notice you fail to even bother mentioning my positive comments about Firefox 3.0, and only highlight my negative comments, which I openly admit are likely to it being an early alpha.

Perhaps you may be blinded by Firefox, and believe everything about it is perfect, but the fact is, there is no perfect browser. I believe Opera 9 does come the closest out of the current crop, but that's my personal experience based on my useage patterns.

Also the Session feature, seems VERY basic, no easy way to load saved sessions, other than at browser start...

Score: 0

By Desides

posted Oct 16, 2006 - 6:45 PM

I didn't quote any of your positive comments because there weren't any. Let's review:

"However, I can't see any reason to want to switch from Opera 9."

"I can't see any major new features to warrent a full 1.0 version number increase. For example, no Sessions and session saving, no tab undelete."

Real positive there, Mark.

"Perhaps you may be blinded by Firefox,"

I'm not blinded by Firefox. I get annoyed when people launch into product arguments, especially when unprovoked--as you tend to do. Pick a browser you like, use it for as long as you like, and shut up about other people using other browsers. I also happen to abhor format wars, console wars, and any other sort of "mine is better than yours, lol" comparison.

"Also the Session feature, seems VERY basic, no easy way to load saved sessions, other than at browser start..."

More positive remarks about Firefox, right?

The session saving feature as implemented is not for power users: it's for crash recovery and basic "pick up where you left off" browsing functionality. If you want to selectively load sessions, get Tab Mix Plus or the Session Saver extension.

Score: 0

By PC_Tool

edited Oct 16, 2006 - 9:19 AM

Been using it myself.

I believe you are mistaken.

http://ftp.mozilla.org/p...ox/nightly/latest-trunk/

3.01a

I understand that to read version 3, point release 1, alpha. You get something else from that?

Score: 0

By Desides

posted Oct 16, 2006 - 6:46 PM

Nope, you're mistaken.

Mozilla brands their products ahead of time, and it apparently causes confusion in plenty of circles. There are dozens of examples when sites have erroneously proclaimed to have, say, the final release version of Firefox 1.5, when all they had was a branch nightly. Betanews itself has jumped the gun several times.

Score: 0

By PC_Tool

posted Oct 17, 2006 - 9:09 AM

Mozilla brands their products ahead of time

...and they branded this 301a.

Sorry, but if they expect people to *not* see that as a possible v3 alpha build, they're nucking futz.

Score: 0

By The MAZZTer

posted Oct 15, 2006 - 10:49 PM

That's the beauty of Firefox. If you want tab undelete or session management, you install an extension that provides those features (Tax Mix Plus is my recommended extension for this).

But 3.0 will definitely have integrated tab undelete. 2.0 already has it, so they just need to merge it in.

Score: 0

By Paul Skinner

posted Oct 14, 2006 - 3:32 PM

"the developers of Firefox 2.0 see an opportunity to propagate the component that could replace the HTML rendering engine as the Web's most prominent and influential component."

Funny man. Good luck to him on that one.

Score: 0

By zhengx

posted Oct 14, 2006 - 2:44 PM

Good news.
I like Python and Javascript, they are both useful and powerful.

Score: 0

By midnighter_9999

posted Oct 14, 2006 - 2:28 PM

I cant go to any firefox sites [mozilla]...using any browser?? tried flushing dns checked if anything is being blocked....nothing seems to be working.....i use spybot.....tried firefox 2 rc2...still nothing......DESPERATELY NEED HELP!!!

Score: 0

By faja

posted Oct 15, 2006 - 11:28 AM

Try different dns servers. Something like 4.2.2.3 or 4.2.2.4.

Score: 0

By midnighter_9999

edited Oct 15, 2006 - 1:32 PM

Still some problem

Score: 0

By UniversityofKentucky

posted Oct 14, 2006 - 4:15 PM

Could it be a firewall issue (e.g. ZoneAlarm can deny a particular program access to the Internet)?

Score: 0

By midnighter_9999

posted Oct 15, 2006 - 7:54 AM

Nope....:-(

Score: 0

By soldier1st

posted Oct 15, 2006 - 4:19 PM

what security software/hardware are you running/using?i can access firefox sites with any browser,also are you on a campus?(college/university)

Score: 0

By bmj2006

posted Oct 14, 2006 - 2:18 PM

Looks like a new toy to play with.
Sounds great for fire fox users.

Score: 0