Closed Bug 30949 Opened 25 years ago Closed 25 years ago

final is a reserved identifier

Categories

(Core :: JavaScript Engine, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED WONTFIX

People

(Reporter: rzach, Assigned: rogerl)

References

()

Details

Got this error: JavaScript Error: final is a reserved identifier URL: http://sawedoffdesign.com/lower.htm Line number: 75 Line text: final = new Image If you visit this page with another browser and don't see a similar error, it may indicate that the site has not yet been updated to support standards implemented by the Mozilla browser such as the W3C Document Object Model (DOM). Please see http://developer.netsape.com/mozilla/ for more information. I did not find "final" in the index of the W3C DOM1 specs. The page works fine in NS 4.x. Is this expected behavior? Linux build 2000.03.07.08
I believe final is an ECMAScript keyword. This is not a DOM issue. The JS group should be aware that some, potentially small, set of pages will break with this addition.
Assignee: vidur → rogerl
Component: DOM Level 0 → Javascript Engine
Status: NEW → ASSIGNED
That is correct - according to ECMAScript Edition 3, "final" is a future reserved word. (Section 7.5.3 )
Revised JS documentation includes a list of these keywords. Not sure what else to do about it at this stage so closing off, ok?
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → WONTFIX
Should there be some kind of compatibility mode for when the page specifies <script language="JavaScript 1.1">, say?
Interestingly the java keywords seem to have been reserved for a long time (I'm really not sure how far back, but I haven't found any documentation that doesn't refer to them). Some of the newer keywords - like instanceof or enum - are controlled by the version number as you suggest.
WONTFIX
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.