Bug in Opera’s eval() function and JS ObjectLiteral notation
March 17th, 2006
I was working through some errors with my AJAX application running on Opera and found a problem parsing the JSON response from the server. Testing things out I found that this script won’t work in Opera 8.53, but does in IE & FF.
var f = eval( “( { 1337: ‘Hello World’ } )” );
alert( f[1337] );
The problem is that Opera doesn’t seem to like the fact that the PropertyName ( 1337 ) is not an Identifier. This is a spec violation as having NumericLiteral as PropertyName inside ObjectLiteral is valid, see ECMA-262 3rd Edition Page 158.
Note this is unrelated to the bug below about Opera and evalScripts().
I reported the bug to Opera and saw this on the submission page:
However, please note that you will not receive a personal reply to the bug report unless we need more information to fix the bug
Great.. so how do I know when it’s going to be fixed?




I just tried this out in Opera 9.00. All fixed.
Comment by Ian — July 18, 2006 @ 6:03 pm