Re: continue as a reserved word and a conflict with IndexedDB

Should the spec have notes referring to the fact that it requires ECMA5 
conformance or parse errors may result?

I'm bringing this up regarding backward compatibility, as reserved 
words, if not escaped, lead to parse errors.

Somewhat useful table:
http://kangax.github.com/es5-compat-table/

It seems for backward compatibility, sites containing IDB-code should 
wrap all code in something like:
[script type="application/ecmascript;version=5"]

Or be certain to escape their continue/delete method calls.

Again, it seems like that ought to be noted within the spec: afaik, this 
is the only active spec which
breaks syntax/parser compatibility in active browsers. (Am I wrong there?).

Further, the spec references ECMAScript 3rd edition. Shouldn't it 
reference the 5th edition, as these reserved words mean
es3 is deprecated/obsolete?

http://www.w3.org/TR/IndexedDB/


-Charles

On 12/6/2010 8:02 AM, Oliver Hunt wrote:
> This should work fine in a nightly already, if it doesn't you need to 
> file a bug.
>
> --Oliver
>
>
> On Dec 6, 2010, at 3:08 AM, Jeremy Orlow wrote:
>
>> I'm pretty sure this was discussed and that EMCA5 does make it 
>> possible to use continue as we do.  At least that's the conclusion we 
>> had with delete.  My guess is that the JavaScriptCore (WebKit's main 
>> JavaScript engine) parser needs to be changed.  If so, you should 
>> probably file a bug at webkit.org <http://webkit.org/>.
>>
>> J
>>
>> On Mon, Dec 6, 2010 at 2:27 AM, Charles Pritchard <chuck@jumis.com 
>> <mailto:chuck@jumis.com>> wrote:
>>
>>     I just noticed that the cursor "continue" method in IndexedDB
>>     runs afoul of the Safari js parser, with "continue" being a
>>     reserved word.
>>
>>     Was there any discussion on this issue? Should there be? Should I
>>     not worry about it, and use  cursor['continue'] instead of
>>     cursor.continue() ?
>>
>>     -Charles
>>
>>
>

Received on Monday, 6 December 2010 19:12:32 UTC