Strict Mode and Function
Dmitry A. Soshnikov
dmitry.soshnikov at gmail.com
Wed Jun 2 02:28:45 PDT 2010
On 02.06.2010 13:13, Dmitry A. Soshnikov wrote:
> So, is it an err in the Annex C statement or the tests are incorrect?
> I don't see the same restriction in the exact 15.3.2 section as it
> mentioned in the Annex C.
Seems, it is correct in all cases, we've just found out it. Sorry for
var f = Function("eval", "'use strict'; alert(eval);");
that should throw an SyntaxError and exactly that is said in the Annex C
I guess -- "...a strict mode /function/ using the Function constructor"
which means that a "strict mode" directive should be inside the
function. But still formulation of the annex bullet may confuse other.
More information about the es-discuss