"use strict"; prepended blindly to scripts in the wild

Brendan Eich brendan at mozilla.com
Tue Sep 7 10:35:05 PDT 2010


On Sep 7, 2010, at 10:28 AM, Boris Zbarsky wrote:

> On 9/7/10 1:21 PM, Brendan Eich wrote:
>> See, e.g., https://bugzilla.mozilla.org/show_bug.cgi?id=593963 -- but this is not the first instance. Previously: https://bugzilla.mozilla.org/show_bug.cgi?id=579119.
> 
> The latter wasn't blind.  It was just a site concatenating a bunch of third-party scripts together, and one of the third-party scripts (correctly) using strict....  So that one is totally Amazon's flub, imo.

Thanks -- this clarifies things, and makes me worry about more of the same.

"Blind concatenation" is a feature as much as a bug in the history of JS. Combined with script inline content moving out to src= URL-named convent, it is how we end up with Unicode BOMs and <!-- pseudo-comments in the middle of files.

/be


More information about the es-discuss mailing list