Closed
Bug 494528
Opened 16 years ago
Closed 16 years ago
Enable JavaScript 1.8 in Jetpack Features
Categories
(Mozilla Labs :: Jetpack Prototype, defect)
Mozilla Labs
Jetpack Prototype
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 445873
People
(Reporter: sephr, Unassigned)
Details
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10 GTB5
Build Identifier:
JavaScript 1.8 is not enabled for Jetpack Features and I think it should be. It seems that JavaScript 1.6 is the highest version enabled. There are many language features that I would like to but cannot utilize in Jetpack Features because of this.
Reproducible: Always
Steps to Reproduce:
1. Use JavaScript 1.7 or 1.8-specific syntax.
Actual Results:
Code runs fine.
Expected Results:
Syntax errors.
Reporter | ||
Comment 1•16 years ago
|
||
Oops, I mixed up the actual results and expected results. I meant this:
Actual Results:
Syntax errors.
Expected Results:
Code runs fine.
Reporter | ||
Comment 2•16 years ago
|
||
I'm really confused here: Some JavaScript 1.8 and 1.7 features work and some don't.
Working:
- Implicit returns
- Iterators
Broken:
- (Some) Object destructuring
- for example: [a,b] = [b,a] works, (function({b}) b) doesn't
- let statements
- (Some) Generators
- for example: i for (i in [1,2,3,4]) if (i < 3) works, generators using the yeild keyword don't
I believe what you are seeing is compatibility mode, only the features that could break content have been disabled. To maintain compatibility, no new keywords can be added.
Comment 4•16 years ago
|
||
Thanks for the report! This is actually due to bug 445873, which is fixed in Firefox 3.1 but will never make it to 3.0, which is what sephr is using. (This actually used to be a Ubiquity bug, so it's quite well-known.)
Because Firefox 3.5 is coming out pretty soon, we're just going to have to say that Jetpacks which use let/yield won't work on FF 3.0, but they will on 3.5; eventually this annoyance will become irrelevant.
If it's likely that folks will continue to use 3.0 well after 3.5 is launched, though, we could add an "apology" that detects when a parsing error occurs due to a let/yield statement and tells the end-user that the Jetpack only works on 3.5? We should probably file a separate bug for that if so.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•