Brendan Eich wrote:
SC.HAS_STRICT = (function() {
"use strict";
return !(function() { return this; }());
}());
(Or something like that. I sure will be happy when there's an
implementation to test this stuff against.)
You don't need two levels of functions. I just spaced out on the "use
strict"; in the anonymous function that returns |this|:
Thanks to you (and also kangax) for pointing this out. I was assuming
it was the strictness of the calling code that mattered, not of the
callee. I now see that Section 10.4.3 specifies this clearly.
David
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss