On 9 November 2011 16:10, John J Barton <[email protected]> wrote: > I'm sure this has been discussed before, but isn't is possible and > desirable to make |this| illegal in "using strict;" when it can be > determined from the AST alone that |this| will bind to |window|? eg: > > Object.keys(foo).forEach(function(key) { > // this is undefined-> window > });
How do you know statically that `this' would be undefined? Somebody might have modified forEach. In JavaScript, you generally don't know a whole lot of things statically. /Andreas _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

