Community
Participate
Working Groups
Currently the ATF javascript validation reports errors for cross browser validation. That makes it worthless and counter productive for XUL development. Simply being able to allow "const" would be a big improvement. To avoid reducing function for existing users this should be a preference setting, possibly per project or resource.
Could you attach a file where you are seeing this problem? This will help us better understand the problem.
XUL supports a variety of language extensions which, I believe, are specific to the Mozilla Javascript implementation. We deliberately wanted the validation to help with cross browser DHTML development, where allowing such conventions would be counter productive. I agree, such a setting would be helpful. I don't recall off-hand how well Rhino is configurable for these options. JSLint likely would have to be turned off to avoid reporting such errors. I've also wondered in the past whether some sort of convention for a "pragma" like directive would be helpful such that the IDE could apply the appropriate validation on a per-file basis. Other pragmas might include jscript, actionscript, etc...
Moving this to the new JSDT component, since the validators in ATF are being dropped in favor of the validation done by JSDT.
JSDT now has an option to turn of semantic validation. That avoids the error messages on the "const" keyword. Window > Preferences > JavaScript > Validator > Errors/Warnings Uncheck "Enable semantic validation". *** This bug has been marked as a duplicate of bug 243886 ***