| Summary: | [language support] JSDT not support the Javascript "get" operator | ||
|---|---|---|---|
| Product: | [WebTools] JSDT | Reporter: | Tom H <tom> |
| Component: | General | Assignee: | Project Inbox <jsdt.javascript-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | Nitin Dahyabhai <thatnitind> |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | Future | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 245785 *** |
Build Identifier: 20100917-0705 Syntax error on token "get", : expected after this token (JSDT with object getter setter) when using this syntax to define getter and setters; get name() { return this.aName }, the javascript validator doesn't like the syntax with this message; Syntax error on token "get", : expected after this token Here is the full file; http://pastebin.com/axaNZDJC However this syntax is used for developing XPCOM objects for firefox plugins. any suggestions on how to fix that? It looks like the validator does not support this operator; https://developer.mozilla.org/en/JavaScript/Reference/Operat ors/Special/get Reproducible: Always Steps to Reproduce: define a getter on some object value; var o = { get latest () { if (this.log.length > 0) { return this.log[this.log.length - 1]; } else { return null; } }, log: [] }