extra comma at end of object literal does not give syntax error

RESOLVED WONTFIX

Status

()

Core
JavaScript Engine
--
minor
RESOLVED WONTFIX
14 years ago
14 years ago

People

(Reporter: Jesse Ruderman, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

14 years ago
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031218
Firebird/0.7+

Steps to reproduce:
1. javascript:alert({a:33,})

Result in Firebird: works as if the comma weren't there
Result in IE:       error: "Expected identifier, string or number"

I noticed this bug because IE rejected my code after Mozilla ran it.
The most I'd do is a strict mode warning.  Wait, I already do that.  Use
options.strict and options.werror if you must, or set the javascript. prefs.

/be
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.