Open Bug 701336 Opened 13 years ago Updated 2 years ago

'let' in prefwindow script gives error

Categories

(Firefox :: General, defect)

8 Branch
x86
Windows Vista
defect

Tracking

()

UNCONFIRMED

People

(Reporter: paulsomers, Unassigned)

Details

Attachments

(1 file)

1.46 KB, application/octet-stream
Details
Attached file let bug.xpi
User Agent: Mozilla/5.0 (Windows NT 6.0; rv:8.0) Gecko/20100101 Firefox/8.0
Build ID: 20111104165243

Steps to reproduce:

Added a <script> to a <prefwindow> which used a let statement.
Example add-on attached

Script in Example:
var foo = {
   bar : function () {let(a=6,b=4) alert(a+b);}
};
foo.bar();


Actual results:

Error Console records
Error: missing ; before statement
Source File: chrome://letbug/content/options.js
Line: 2, Column: 35
Source Code:
   bar : function () {let(a=6,b=4) alert(a+b);} 


Expected results:

Alerted "10"
It seems to work [The error message goes away] if you specify Javascript version 1.8 - but, of course, alert is not available and I have run out of time to try anything else today.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: