"use strict"; prepended blindly to scripts in the wild
brendan at mozilla.com
Thu Sep 9 07:32:09 PDT 2010
On Sep 9, 2010, at 1:09 AM, Dmitry Soshnikov wrote:
> Thus the site's combined file won't be globally strict, however since a lib is tested before a production release (at least I hope so ;), then the lib's code should pass the strictness, and therefore, a "use strict" may be even removed from the lib's file. However, if not to remove, then an empty statement is enough.
That does not disable strict mode. The problem at real sites including an intel.com property is that subsequent parts of the concatenation have had strict mode errors.
> ;/*1st lib*/"use strict";eval = 10;/*2st lib*/"use strict";arguments=20;/*our code*/
An example showing the problem would need a "use nonstrict"; directive after the first part of the concatenation, but there is no such directive.
More information about the es-discuss