Closed unscriptable closed 11 years ago
I actually like the ES5 "use strict"
eval
feature, it's just if the goal is global eval'ed code it won't work with an indirect eval
call of a string containing a valid "use strict" directive.
This is not a "failure", http://bugs.jquery.com/ticket/13714#comment:13
Ok, iiuc, evaling code that contains "use strict";
inside a global eval will cause the global scope to become strict. Evaling code that contains "use strict";
inside a script element does not change the global scope.
inside a global eval will cause the global scope to become strict.
It'll cause the code to be executed as if it's inside an IIFE.
closing since we always wrap in a function () {}. thanks guys.
no prob hann, or hamm, no hann.
According to this jQuery ticket by @jdalton, "indirect eval" fails to offer the proper
"use strict";
behavior. Consider switching the default configuration option (injectScript
) to true to use script injection instad of indirect eval.Code: https://github.com/cujojs/curl/blob/master/src/curl/loader/cjsm11.js#L101
This is only an issue with unbundled commonjs modules, which are loaded via XHR.