2012/1/4 Herby Vojčík <[email protected]>:
> Hi,
>
> If you must think whether you should put it in
> parentheses or not to prevent runtime error, you rather write { window:false
> } and reduce the insecurity.
You already have to.
'boolean' === typeof eval('{ window: false }')
See section 12.4 : http://es5.github.com/#x12.4
"""
12.4 Expression Statement # Ⓣ
Syntax
ExpressionStatement :
[lookahead ∉ {{, function}] Expression ;
NOTE An ExpressionStatement cannot start with an opening curly brace
because that might make it ambiguous with a Block.
"""
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss