Henry wrote:
Quote:
On Jun 20, 9:21 am, slebetman <slebet... (AT) gmail (DOT) com> wrote:
var d = new Dict({
this : 1,
^^^^
This, the code and the keyword in this context, is a syntax error.
Only Identifiers, string literals and number literals may appear to
the left of the colons in an object literal (though number literals
don't work in some implementations (such as on Mac IE)). |
However, it should be noted that although `this' is listed as a reserved
word in ECMAScript Ed. 3 Final, section 7.5.1, we are not looking at a
syntax error in JavaScript 1.7 as supported by Firefox 2.0.0.14 and
SeaMonkey 1.1.9, and JavaScript 1.8 as supported by Firefox 3.0, but merely
an unfortunate choice of property name.
PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee